Setting Up An Email Server

Mar 12, 2013, updated Aug 11, 2019 Deployment


Exim4 is used for setting up a SMTP mail server.
It is installed by default in Ubuntu Server. You need to reconfigure it to be used.


sudo aptitude install exim4

Reconfigure Exim4:

sudo dpkg-reconfigure exim4-config

Set all settings as default except the domain name. Type a correct domain name, that is alive.


It is recommended to use postfix

sudo apt-get install postfix

On Mac:

postfix is already installed by default.

sudo vi /System/Library/LaunchDaemons/org.postfix.master.plist

add following line before the closing </dict> tag:


Start service

sudo postfix start

Check that SMPT is running:

telnet localhost 25

Test Email:

date | sendmail