Set VPS Time

sudo dpkg-reconfigure tzdata

Check system FQDN

hostname -f

Set system IP & hostname

sudo nano /etc/hosts

        ...
        IPADDRESS   HOSTNAME.DOMAINNAME HOSTNAME
        ...

Install exim4 and mailutils

sudo apt-get install exim4-daemon-light mailutils

If exim4 config does not run or exim4 is already installed run;

sudo dpkg-reconfigure exim4-config

ScreenShots of config screens options not shown leave blank or as default. Change HOSTNAME to your systems hostname & set your own domain name

After configuration restart exim;

sudo service exim4 restart

Send a test email;

echo "This is a test." | mail -s "Testing" someone@somedomain.com

If errors or email not recieved check log;

sudo nano /var/log/exim4/mainlog 

Errors encountered

Error (-53): retry time not reached for any host;

/usr/sbin/exim_tidydb -t 1d /var/spool/exim retry > /dev/null
/usr/sbin/exim_tidydb -t 1d /var/spool/exim reject > /dev/null
/usr/sbin/exim_tidydb -t 1d /var/spool/exim wait-remote_smtp > /dev/null

Error Permission Denied fix;

sudo chown -R Debian-exim /var/spool/exim4/
sudo chown -R Debian-exim /var/log/exim4

Check out the Exim4 Cheat Sheet