Ubuntu mail server switch to Postfix from Sendmail

postfixsendmailUbuntu

Sendmail is running as default as mail server on Ubuntu. How to switch to postfix.

Best Answer

I have extensive experience with Postfix.

The quickest and easiest way to do this on Ubuntu is:

sudo apt-get install postfix

This will remove sendmail (it will install a version appropriate for postfix).

You will then need to configure postfix.

Do you also have questions about configuration?

To have decent settings choose "internet site" during the installation process.

You can get away with a config file as short as this:

sudo nano /etc/postfix/main.cf

myhostname = mail.somesite.com

mydestination = $myhostname

myorigin = $myhostname

relay_domains = $myhostname

Be very, very careful about avoiding setting up an open relay server. You'll quickly get blacklisted.