Install Exim and mailutils:
# apt-get -y install exim4-daemon-light mailutils
# dpkg-reconfigure exim4-config
Select the following options:
# echo "Testing Exim" | mail -s Test <type one of your emails here>
If Exim does not deliver your messages, check that your provider does not block outgoing connections to 25 (SMTP) port by executing "telnet somedomain 25". Install the telnet package if it is not installed by executing "apt-get -y install telnet".
On some computers Exim displays Cannot open main log file "/var/log/exim4/mainlog": Permission denied error message when testing email sending. It can be solved by creating /var/log/exim4 folder as follows:
# mkdir -p /var/log/exim4 # chmod 740 /var/log/exim4 # chown Debian-exim:adm /var/log/exim4 # touch /var/log/exim4/ # chown Debian-exim:adm /var/log/exim4/mainlog