Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

On Ubuntu 12.04, I'm trying to use dpkg-set-selections to automagically configure postfix on deployed machines with the following:

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
DEBIAN_FRONTEND=noninteractive apt-get install postfix mailutils

Unfortunately, the configurator insists on adding mydomain.org to the postfix/destinations (aka mydestinations) config parameter:

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

How can I configure this properly? I want any unqualified mail to go out as user@mydomain.org and be relayed through the smarthost.

share|improve this question

1 Answer 1

I think the problem is in the install scripts, postfix.preinst has some interesting code about it, and some comments:

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.*

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.