Linux trick: authenticated SMTP

To do simple password authentication, sendmail servers will need the lines

TRUST_AUTH_MECH(‘DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl
define(‘confAUTH_MECHANISMS’, ‘DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl

in their sendmail.mc file (compiled to /etc/mail/sendmail.cf by doing make in /etc/mail). [Above and below, the first quote character is the "ssh evaluate command" type, the second is the standard straight quote.]

I have not been able to do SMTPS (SMTP over SSL). Clearly opening port 465 and doing

DAEMON_OPTIONS(‘Port=smtps, Name=TLSMTA, M=s’)dnl 
define(‘confSERVER_CERT’,‘/usr/share/ssl/certs/imapd.pem’)dnl
define(‘confSERVER_KEY’,‘/usr/share/ssl/certs/imapd.pem’)dnl

is a start, but there still seems to be a problem with certificates.

A sneaky bug in some sendmail upgrades (in particular, sendmail-8.12.11-4.24.1.legacy) seems to break SMTP authentication. To fix it, try

/usr/sbin/alternatives --set mta /usr/sbin/sendmail.sendmail

See this bug report.

Mar 24, 2006

smtpauth (/linuxtricks)
2006-03-24, 12:05 [edit]


  Login:   Password:   [rss] [cc] [w3] [css]

© M. Vallisneri 2012 — last modified on 2010/01/29

Tantum in modicis, quantum in maximis