Google: this message does not meet IPv6 sending guidelines

Published: 6 years ago web dev

A quick problem I ran into today with sending mail from a VPS with IPv6 enabled to a Google email address.

When running:

mail -s "test sending" someone@gmail.com < /dev/null

I'd get the following lovely reply from Google:

cat /var/mail/user

   ----- Transcript of session follows -----
... while talking to gmail-smtp-in.l.google.com.:
>>> DATA
<<< 550-5.7.1 Our system has detected that this message
<<< 550-5.7.1 does not meet IPv6 sending guidelines regarding PTR records and
<<< 550-5.7.1 authentication. Please review
<<< 550-5.7.1  https://support.google.com/mail/?p=IPv6AuthError for more information
<<< 550 5.7.1 . n63si2295642edc.204 - gsmtp
554 5.0.0 Service unavailable

The reason for this is that IPv6 assigned by RamNode doesn't have a PTR record.

You can confirm this with dig:

dig -x [ipv6 address]

You can add reverse DNS if you're using RamNode by logging in to their SolusVM control panel from where you can go to the network tab and view your assigned IPv6s. I'm only assigned 16 which is seems more than a little stingy. Apparently you can request a full /64 subnet by ticket which would you give you a few more to play with (18,446,744,073,709,551,616 to be precise).

Anyway after adding the reverse DNS you also need to ensure your DNS for the domain has an AAAA record that points to the IPv6 you just added reverse DNS for.

And with that done - Google is slightly* more likely to accept your mail.

* It still goes to spam - but that is a topic for another blog post!