How To Fix Email Service Unavailable Delivery Issues with IPv6 on Amazon Linux
erics, Posted July 16th, 2021 at 2:30:23pm
PROBLEM: Email delivery to Google was failing with a “Service Unavailable” error:
1 |
relay=aspmx.l.google.com. [IPv6:2607:f8b0:400d:c0c::1a], dsn=5.0.0, stat=Service unavailable |
Note that the network address for the destination is shown as IPv6!
That is the root cause of the issue:
1. Sendmail is sending mail from the IPv6 address instead of the IPv4 address
2. Google rejects IPv6 senders without proper reverse DNS lookup or SPF records
SOLUTION:
Configure sendmail to use the IPv4 address family and pattern:
APPEND TO: sendmail.mc
1 |
CLIENT_OPTIONS(`Family=inet6,Addr=::ffff:0.0.0.0')dnl |
EXECUTE: /etc/mail/make
EXECUTE: service sendmail restart
Leave Your Comment
All fields marked with "*" are required.