Article 51GD4 Need help integrating sendmail with SendGrid

Need help integrating sendmail with SendGrid

by
mfoley
from LinuxQuestions.org on (#51GD4)
I've just signed up for sendgrid using the SMTP relay method. I've used this method successfully with other smart hosts requiring authentication, but not with SendGrid. I'm hoping some LQ expert has configured sendgrid and can help me out.

My sendmail.mc file has:
Code:define(`SMART_HOST',`smtp.sendgrid.net')dnl
FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')dnlMy /etc/mail/authinfo file has:
Code:AuthInfo:smtp.sendgrid.net "U:myapikey" "P:mypw"where myapikey is the keyname I created on the sendGrid site and mypw is the password they generated.

I built authinfo.db with 'makemap hash authinfo < authinfo'. Permissions on authinfo.db are -rw-r-----.

I've created /etc/sasl2/Sendmail.conf containing:
Code:pwcheck_method: saslauthd
mech_list: EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAINPermissions on that file and parent directory are: -rw-------.
saslauthd is running.

maillog has:
Code:Mar 31 10:29:14 hiram sm-mta[19809]: STARTTLS=client, relay=smtp.sendgrid.net., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256
Mar 31 10:29:14 hiram sm-mta[19809]: 02VETDmH019802: AUTH=client, available mechanisms do not fulfill requirements
Mar 31 10:29:14 hiram sm-mta[19809]: AUTH=client, relay=smtp.sendgrid.net., temporary failure, connection abort
Mar 31 10:29:14 hiram sm-mta[19809]: 02VETDmH019802: to=<mfoley@novatec-inc.com>, delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=120574, relay=smtp.sendgrid.net. [167.89.123.53], dsn=4.0.0, stat=Deferred: Temporary AUTH failureAny idea what I'm doing wrong?

More ...
Actually, I just read that saslauthd is not needed unless someone is authenticating with me.

Later:
stopped saslauthd. Changed authinfo to
Code:AuthInfo:smtp.sendgrid.net "U:myapikey" "P:mypw" "M:PLAIN"New maillog results:
Code:Mar 31 10:55:20 hiram sm-mta[23284]: STARTTLS=client, relay=smtp.sendgrid.net., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256
Mar 31 10:55:20 hiram sm-mta[23284]: 02VEtIg8023277: to=<mfoley@novatec-inc.com>, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120587, relay=smtp.sendgrid.net. [167.89.115.53], dsn=4.0.0, stat=Deferred: Connection reset by smtp.sendgrid.netlatest?d=yIl2AUoC8zA latest?i=UkZMauvDNb0:XoBzcco-rMg:F7zBnMy latest?i=UkZMauvDNb0:XoBzcco-rMg:V_sGLiP latest?d=qj6IDK7rITs latest?i=UkZMauvDNb0:XoBzcco-rMg:gIN9vFwUkZMauvDNb0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments