I've been sitting here for a few hours now attempting to get sendmail to send the emails through an external SMTP server. I've gotten very close, but now I'm completely stuck. It seems that sendmail isn't sending the authentication information I've set. Is there some configuration line I'm missing?
Please help. :(
Running CentOS 5.7
EDIT:
As requested, I'll add a few things from my sendmail here.
Where I've specified to use auth information:
FEATURE(authinfo',hash -o /etc/mail/auth/client-info.db')dnl
/etc/mail/auth/client-info:
AuthInfo:in.mailjet.com "U:myusername" "P:mypassword" "M:PLAIN"
Attempting to send an email:
# sendmail -AM -t -v
to:[email protected]
from:[email protected]
.
[email protected]... Connecting to in6.mailjet.com. via relay...
220 in6.mailjet.com ESMTP Mailjet
>>> EHLO mydomain.com
250-in6.mailjet.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5
250-AUTH=PLAIN LOGIN DIGEST-MD5 CRAM-MD5
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
>>> STARTTLS
220 2.0.0 Ready to start TLS
>>> EHLO mydomain.com
250-in6.mailjet.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5
250-AUTH=PLAIN LOGIN DIGEST-MD5 CRAM-MD5
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
>>> MAIL From:<[email protected]> SIZE=37
250 2.1.0 Ok
>>> RCPT To:<[email protected]>
>>> DATA
554 5.7.1 <[email protected]>: Relay access denied
554 5.5.1 Error: no valid recipients
>>> RSET
250 2.0.0 Ok
/root/dead.letter... Saved message in /root/dead.letter
Closing connection to in6.mailjet.com.
>>> QUIT
221 2.0.0 Bye
i had the same issue. Finally made it with several configurations.
To test it you can execute:
I hope it works for you.
My short configuration in sendmail.mc for SMTP Auth as a client for mailjet.com :
587 because port 25 is blocked. STARTTLS and ESMTP are now automaticely in Sendmail. Before,
libsasl2-modules
(in addition to the not necessarylibsasl2-modules-db
) andsasl2-bin
must be installed. Thinks to switch to START=yes in /etc/defa ult/saslauthd (in debian)In access:
And finally, run
/usr/share/sendmail/update_auth
.So, there are only 2 files to modify
sendmail.mc
andaccess
. After of course,make
in/etc/mail
thenservice sendmail restart
.ps: A lot of tutorial, add :587 after
AuthInfo:mailjet.com
, it's AMHA an error. A debug-d60.5
(different lookup map) it's my prove.For sendmail, I usually manage SMTP auth by adding an entry in
/etc/mail/access
. A quick example for your setup is here:Save that and restart the sendmail daemon,
/sbin/service sendmail restart
.Did you run:
Unless you build the client-info.db file from the text one using the command above, the information that is in there, is not read by sendmail
EDIT #1:
From the bat book I copy that:
You are connecting to in6.mailjet.com which is an MX for in.mailjet.com. So maybe you have to change your AuthInfo: line to:
EDIT #2:
You seem to have a minor typo in the FEATURE(authinfo) declaration:
Remove -o (optional) from feature authinfo and restart/reload sendmail. It will make sendmail refuse to start without access to authinfo map/file.
Repeat sending you test email with tracking map lookups (includes tracking authinfo map lookups)
Does sendmail look for authinfo entries? [The answear should narrow list of possible problems]