在Ubuntu 12.04上,我试图使用dpkg-set-selections
在部署的机器上自动configurationpostfix,如下所示:
debconf-set-selections <<EOF postfix postfix/main_mailer_type select Satellite system postfix postfix/root_address string [email protected] 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
不幸的是,configuration程序坚持要将mydomain.org添加到postfix/destinations
(aka mydestinations
)configuration参数中:
postfix postfix/destinations string mydomain.org, myserver.mydomain.internal, localhost
我怎样才能正确地configuration这个? 我想要任何不合格的邮件作为[email protected]
出去,并通过smarthost进行中继。
我认为问题出在安装脚本中, postfix.preinst
有一些有趣的代码,还有一些评论:
在main.cf中添加“mydomain”条目以进行升级? Postfix 2.3.3-2及更高版本需要在main.cf中进行更改。 具体而言,必须指定mydomain,因为hostname(1)不是完全限定的域名(FQDN)。 。 未能解决这个问题将导致邮件破损。 拒绝此选项以中止升级,让您有机会自己添加此configuration。 接受这个选项,根据机器的FQDN自动设置mydomain。*