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

I'm currently trying to automate my Postfix installation and most things work really... but I can't seem to stop postfix-policyd asking for the MySQL root password.

Here is what I got so far:

echo 'dbconfig-common postfix-policyd/dbconfig-install boolean false' | debconf-set-selections

echo 'postfix-policyd postfix-policyd/dbconfig-install boolean false' | debconf-set-selections

echo 'postfix-policyd postfix-ploicyd/internal/skip-preseed boolean false' | debconf-set-selections

echo 'dbconfig-common dbconfig-common/internal/skip-preseed boolean false' | debconf-set-selections

echo 'postfix-policyd postfix-policyd/dbconfig-upgrade boolean false' | debconf-set-selections

echo 'postfix-policyd/dbconfig-reinstall boolean false' | debconf-set-selections

echo 'dbconfig-common dbconfig-reinstall boolean false' | debconf-set-selections

echo "postfix-policyd postfix-policyd/internal/reconfiguring boolean false" | debconf-set-selections

It seems postfix-policyd just ignores the

postfix-policyd postfix-policyd/dbconfig-install boolean false

How do I fix this?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

In my script I disable the interactive frontend first:
export DEBIAN_FRONTEND=noninteractive

Then I set al the preferences, f.e.:
postconf -e "mynetworks = 127.0.0.0/8, ${NETWORK_CIDR}"

You can then re-enable it by unsetting it:
unset DEBIAN_FRONTEND

Or, you can make it very easy by just running this command:
DEBIAN_FRONTEND=noninteractive apt-get install postfix-policyd

share|improve this answer
    
Oh man, this is awesome. Works like a charm! +1 for you! –  Pierre Dennert Mar 5 '11 at 17:09

Your Answer

 
discard

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.