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
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
postfix is already installed by default.
sudo vi /System/Library/LaunchDaemons/org.postfix.master.plist
add following line before the closing
<key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/>
sudo postfix start
Check that SMPT is running:
telnet localhost 25
date | sendmail firstname.lastname@example.org