21

During the postfix installation and configuration, I was presented with a few options on how to send and receive email. I might have chosen the wrong option. How do I go back to that configuration screen to change my option?

Thierry Lam
  • 6,261
  • 10
  • 27
  • 24
  • What do you mean by "configuration screen"? Sounds like an OS tool. For example, Debian has dpkg-reconfigure, and I know it has some sort of graphical configuration for first time email setup – derchris Mar 25 '11 at 16:23
  • I'm actually using `exim` now, to launch the configuration screen after installing exim is `sudo dpkg-reconfigure exim4-config`. I was looking for something similar for postfix. – Thierry Lam Mar 25 '11 at 17:35
  • 5
    dpkg-reconfigure postfix – derchris Mar 25 '11 at 17:41

3 Answers3

23

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.

OldTimer
  • 331
  • 2
  • 3
12

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.

Samuel Åslund
  • 221
  • 2
  • 3
10

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.

Alex
  • 428
  • 1
  • 9
  • 14
  • 3
    the "postconf" command is also helpful, especially to show parameters which are defaults, but not defined in the main.cf configuration file – malcolmpdx Mar 25 '11 at 15:17