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
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.
/etc/ssmtp/ssmtp.confshould look like this:
firstname.lastname@example.org mailhub=smtp.gmail.com:587 rewriteDomain=nn.nn.nn.nn (my IP) hostname=nn.nn.nn.nn FromLineOverride=YES UseTLS=YES UseSTARTTLS=YES AuthUseremail@example.com AuthPass=verysecret AuthMethod=LOGIN
I had to
/etc/ssmtp/revaliasesfor root and normal user:
# /etc/ssmtp/ssmtp.conf: firstname.lastname@example.org email@example.com # /etc/ssmtp/revaliases: root:firstname.lastname@example.org:smtp.posteo.de:587 username:email@example.com:smtp.posteo.de:587
…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.
Dec 10th, 2017