Configurar o Sendmail com autenticação: AUTH e SASL

Comecei a receber erros do Spamhaus, da lista PBL http://www.spamhaus.org/pbl/query/PBL265923

Configurei usando estas ideias (mas modifiquei):
1) http://edc.tversu.ru/elib/inf/0047/0596004710_sendmailckbk-chp-7-sect-2.html
2) http://www.sendmail.org/~ca/email/auth.html
3) http://unix.stackexchange.com/questions/132711/using-port-587-with-sendmail

------------------------------------------------
## De notar que no link 2) acima, a configuração apresentada, relativa à linha seguinte, está obsoleta desde o sendmail 8.12
define(`confDEF_AUTH_INFO', `/etc/mail/auth/auth-info')dnl
## No 8.13, deve usar-se a linha AuthInfo no ficheiro /etc/mail/access
------------------------------------------------

cd /usr/share/sendmail/cf/cf

# Colocar as linhas seguintes no ficheiro linux.smtp.mc:
# (a 5ª linha é um comentário, embora fosse a original, mas punha o servidor a correr no porto 587, e deixava de receber email)
TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5 PLAIN LOGIN')dnl
define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 PLAIN LOGIN')dnl
FEATURE(`no_default_msa')dnl turn off default entry for MSA
DAEMON_OPTIONS(`Port=25, Name=MSA, M=E')dnl
dnl DAEMON_OPTIONS(`Port=587, Name=MSA, M=E')dnl
EXECUTAR:
	m4 ../m4/cf.m4 linux.smtp.mc > sendmail.cf
COPIAR: cp sendmail.cf /etc/mail

 

# Correr o programa seguinte:
# e inserir a password pretendida: xxxxxxxxxxxx
saslpasswd2 -c -u myServer.pt -f /etc/mail/sasldb myUser

 

# Colocar a linha seguinte no ficheiro /etc/mail/access
AuthInfo: "U:myUser" "I:myUser" "P:xxxxxxxxxxxx" "R:myServer.pt"
DEPOIS CORRER:
	makemap hash /etc/mail/access.db < /etc/mail/access
	chmod 600 /etc/mail/access /etc/mail/access.db 

REINICIAR o sendmail:
	/etc/rc.d/rc.sendmail  restart