a

Use DMA instead of sendmail

🕐 1 minutes

📅 2022-01-21

$: doas sysrc sendmail_enable=NONE
$: doas service sendmail onestop


$: doas nano /etc/mail/mailer.conf =>

# Execute dma instead of sendmail
sendmail 	/usr/libexec/dma
mailq 		/usr/libexec/dma
newaliases 	/usr/libexec/dma
rmail 		/usr/libexec/dma


$: doas nano /etc/periodic.conf =>

# Disable some sendmail specific daily maintenance routines
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"

What remains is the configuration of DMA—here is an example for a Gmail account:

$: doas nano /etc/dma/dma.conf =>

SMARTHOST smtp.gmail.com
PORT 587
SECURETRANSFER
STARTTLS
AUTHPATH /etc/dma/auth.conf
MASQUERADE '<login-name>@gmail.com

$: doas echo '<login-name> | smtp.gmail.com: <login-password>'> /etc/dma/auth.conf