How do I change postfix configuration after installing it?

Solution 1:

The comment by derchris above is the actual answer to the original question. I know it's been years since this was asked, but neither of the answers were actually specific to the original question.

So to be clear, to get back to the configuration screen for postfix installation do:

sudo dpkg-reconfigure postfix

The dpkg-reconfigure command is useful for other packages that have configuration screens during the startup process as well.

Solution 2:

The postfix configuration is stored in /etc/postfix/main.cf and /etc/postfix/master.cf. You can change the options there and restart postfix. If you are going to be running a postfix server, you will want to become at least a little familiar with these two files (especially main.cf). The options are well documented at postfix.org.

As a tip, something I like to do is make a backup of main.cf then go through and delete everything that is commented out. That way I have less crap to sort through when I need to modify it and it makes it a little less overwhelming.


Solution 3:

After adjusting configuration as Alex describes use:

postconf

(As malcom commented above) To verify that the configuration file is reasonably correct and list all configurations actually applied, then:

sudo postfix check

To verify again that the configuration file is reasonably correct and create any necessary directories. Then use:

sudo postfix reload

To apply the updated configuration.

Tags:

Postfix