ubuntu – 使用dpkg-set-selections自动配置postfix

前端之家收集整理的这篇文章主要介绍了ubuntu – 使用dpkg-set-selections自动配置postfix前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在Ubuntu 12.04上,我尝试使用dpkg-set-selections在已部署的计算机上自动配置postfix,具体如下:
debconf-set-selections <<EOF
postfix postfix/main_mailer_type select Satellite system 
postfix postfix/root_address string admin@mydomain.org
postfix postfix/mailname string mydomain.org
postfix postfix/relayhost string gw.mydomain.internal
postfix postfix/destinations string $(hostname -f),localhost
EOF
DEBIAN_FRONTEND=noninteractive apt-get install postfix mailutils

不幸的是,配置程序坚持将mydomain.org添加到postfix / destinations(aka mydestinations)配置参数:

postfix postfix/destinations    string  mydomain.org,myserver.mydomain.internal,localhost

如何正确配置?我希望任何不合格的邮件都以user@mydomain.org的形式发送,并通过smarthost进行中继.

我认为问题出在安装脚本中,postfix.preinst有一些有趣的代码,还有一些注释:

Add a ‘mydomain’ entry in main.cf for upgrade? Postfix version 2.3.3-2 and later require changes in main.cf. Specifically,mydomain must be specified,since hostname(1) is not a fully qualified domain name (FQDN). . Failure to fix this will result in a broken mailer. Decline this option to abort the upgrade,giving you the opportunity to add this configuration yourself. Accept this option to automatically set mydomain based on the FQDN of the machine.*

原文链接:https://www.f2er.com/ubuntu/347652.html

猜你在找的Ubuntu相关文章