2

I'm having trouble configuring Postfix to deliver e-mail via relay to Sendgrid.

I get the following error: "Unauthenticated senders not allowed"

Winfield
  • 18,985
  • 3
  • 52
  • 65

1 Answers1

3

Looks like it was the SASL config within Postfix authenticating to Sendgrid. We were able to use the following:

smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
mailbox_size_limit = 256000000

# Sendgrid Settings
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:SENDGRID_ACCOUNT_EMAIL_HERE:PASSWORD_HERE
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = may
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net]:587
Winfield
  • 18,985
  • 3
  • 52
  • 65
  • 1
    Thank you for sharing your solution this was the only way to make Sendgrid work for me on Google Compute Engine. – matyas Mar 20 '19 at 00:30
  • whats this issue: SASL authentication failure: No worthy mechs found? to=, relay=smtp.sendgrid.net[159.122.219.43]:587, delay=2.5, delays=0.04/0.04/2.4/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.sendgrid.net[159.122.219.43]: no mechanism available) – Usman Ali Maan Oct 14 '19 at 15:33