SSMTP send off

If you are unlucky enough to work in a corporate environment where they don't trust your Linux machine to send mail, you probably need to relay to some fucked up Exchange server like provide. Poor you.

Since SSMTP sucks, since:

I spent a morning migrating from /etc/ssmtp/ssmtp.conf to ~/.msmtprc. The reason why it took so long as msmtp's "auth on" didn't work and after a LOT of debugging, I found the solution to be auth login.

So this is my ~/.msmtprc:

logfile ~/.msmtp.log
auth login
password secret

My old /etc/ssmtp/ssmtp.conf

hendry@deb02:~$ grep -v "^#" /etc/ssmtp/ssmtp.conf  | grep .

You can tell you have authorisation problem with your relay if your spits out like "550 5.7.1 Unable to relay".

Jan 31 10:49:22 tls=off auth=off smtpstatus=550 smtpmsg='550 5.7.1 Unable to relay' errormsg='recipient address not accepted by the server' exitcode=EX_DATAERR

The "auth=off" should be a dead giveaway.

Debug tips

With thanks from

Test mail:

$ cat test.mail
Subject: A test

Yadda, yadda, yadda

SSMTP debugging:

cat test.mail | /usr/sbin/ssmtp -d5

the MSMTP log to compare to:

cat test.mail | msmtp -d
Found any of my content interesting or useful?