s/ssmtp/dma/

A few weeks ago I missed a friend's birthday. Then I saw that I had not gotten any mails from my home server for a couple of days - and since I use bdrem to get notified about birthdays by mail, they did not reach me.

My mail server showed the following error:

postfix/smtpd[323]: connect from cafe.dip0.t-ipconnect.de[84.1.1.1]
postfix/smtpd[323]: SSL_accept error from cafe.dip0.t-ipconnect.de[84.1.1.1]: -1
postfix/smtpd[323]: warning: TLS library problem: error:140940F5:SSL routines:SSL3_READ_BYTES:unexpected record:s3_pkt.c:1456:
postfix/smtpd[323]: lost connection after STARTTLS from cafe.dip0.t-ipconnect.de[84.1.1.1]
postfix/smtpd[323]: disconnect from cafe.dip0.t-ipconnect.de[84.1.1.1]

I'm using ssmtp on my laptop and my home server to push mails off to my mail server, and it had served me well over the last decade. ssmtp itself did not show any error.

There was no specific bug to find about that error message, and I noticed that the last commit was made 2011, 5 years ago. Things changed quite a bit since then; SSLv2 and SSLv3 are considered unsafe now and have been disabled on my server. My guess is that ssmtp does not support TLS and thus fails.

Instead of reporting a bug to an apparently unmaintained package and waiting for it to be fixed, I looked for an alternative.

dma

In the end I replaced ssmtp with dma, the Dragonfly Mail Agent. It has the same goal as ssmtp had - hand local mail off to a mail server - and works.

Configuration

ssmtp

Previously I used the following config for ssmtp:

/etc/ssmtp/ssmtp.conf
root=cweiske@example.org
mailhub=mail.example.org
hostname=bogo.home.example.org
FromLineOverride=YES

AuthUser=server.home.example.org@example.org
AuthPass=password
UseTLS=yes
UseSTARTTLS=yes

dma

dma uses two config files, one for basic configuration and one for credentials. Adjusting the sample config file shipped with dma works fine:

/etc/dma/dma.conf
SMARTHOST mail.example.org
AUTHPATH /etc/dma/auth.conf
SECURETRANSFER
STARTTLS
MAILNAME /etc/mailname
/etc/dma/auth.conf
server.home.example.org@example.org|mail.example.org:password
/etc/mailname
server.home.example.org

Written by Christian Weiske.

Comments? Please send an e-mail.