Chapter 7. Exchanging Exim with Postfix

I don't really care for Exim - purely a subjective matter - and are a bit more comfortable with Postfix.

For this reason, I swap out the Exim mailer and install postfix instead.

Debian has made the exchange of MTA (Mail Transfer Agent) pretty straightforward, and as I have Yet to configure anything which involves a mail-server, there should be no trouble with just changing the default MTA.

7.1. Installing Postfix

To install Postfix we need to add some packages

apt-get install postfix
apt-get install webmin-postfix

And that should be it...

7.2. Cleaning up after Exim

Some configuration has been left behind by the Exim mailer, which is of course not a good thing for our nice little system.

To clean up we need to go a bit behind apt-get, and do some of the things a bit more manually.

dpkg -r exim
dpkg --purge exim

7.3. Using the maildir format

If You would like to try out the maildir format, then fortunately postfix support this format directly.

In /etc/postfix/ add a line with

home_mailbox = Maildir/

And we should be using Maildir when postfix is restarted/reloaded.

7.4. Opening the firewall

To allow mail to reach our mail-server, we need to allow connection to port 25 through our firewall.

Earlier a script was provided for creating firewall rules. Alter the script, so that it shows something like


What we have done is added the line with "tcp:smtp" to the script.

Rerun the script, and save this as the new active ruleset. If in doubt, refer back to Starting the firewall at boot.