# DMA with SSL and STARTTLS, not working



## ralphbsz (Dec 4, 2013)

I am still on FreeBSD 9.0 (yes, I know, I need to upgrade urgently).  This is a server machine that sends very little e-mail itself, a few messages per month.

A few years ago, my ISP (a.k.a. my smart host) changed to no longer accept unsecured mail on port 25.  Since setting up Sendmail with STARTTLS is a lot of work, I decided to give a much simpler MTA a try, and installed DMA instead.  It worked out of the box.

Sometime over the last few months, DMA become broken.  It can still deliver mail locally, but it can no longer deliver mail off-host using the smart host.  The mail is just queueing up.  When DMA tries to deliver it (for example because I tickle it with -q), here is what I find in /var/log/maillog:

```
Dec  3 13:36:04 house dma[80b6.2841b0d0]: trying delivery
Dec  3 13:36:04 house dma[80b3.2841b0d0]: trying delivery
Dec  3 13:36:04 house dma[80b3.2841b0d0]: using smarthost (mail.my_isp.net:465)
Dec  3 13:36:04 house dma[80ad.2841b0d0]: trying remote delivery to mail.my_isp.net [12.34.56.78] pref 0
Dec  3 13:41:04 house dma[80b3.2841b0d0]: stack overflow detected; terminated
```

Observe the five minute gap.  Strange, isn't it?  If you look at the log, the stack overflow always happens exactly five minutes after delivery is attempted.  I tried debugging it by running DMA in the foreground, but I can't find any debug or verbose switches.

Here is the content of /usr/local/etc/dma/dma.conf, with all the comments and blank lines removed:

```
SMARTHOST mail.my_isp.net
PORT 465
ALIASES /etc/mail/aliases
SPOOLDIR /var/spool/dma
AUTHPATH /usr/local/etc/dma/auth.conf
SECURETRANSFER
STARTTLS
FULLBOUNCE
MAILNAME my.domain.com
```

And the particulars (name of smart host, port for SSL/TLS, authentication username and password) all check out.  Any idea?


----------

