Getting email to work with smartd, ssmtp, and picky email providers

My server is running debian jessie.
Recently I had been messing around with different mailing setups, which resulted in total breakage of email sending, as sometimes required by some software, usually via sendmail.

First of all I purged all packages, like dovecot and exim4, and always performed an
“apt-get –purge autoremove” afterwards.
Then I had to go through all the leftover configuration & modifications in /etc. There was a lot of it, even after purging the packages.

With a hopefully clean system, install ssmtp and mailutils: apt-get install ssmtp mailutils.

Configuration for Gmail:
rewriteDomain=nn.nn.nn.nn (my IP)

Configuration for other Picky Email Provider

I had to

# /etc/ssmtp/ssmtp.conf:
# /etc/ssmtp/revaliases:

…maybe that wasn’t really necessary, but often it seems to be important that th from addresses matches that of the actual email account used.

Other things


Dec 10th, 2017