Gmail (& Google Apps) & IPv6

It seems that Google’s anti spam measurement for IPv6 is basically checking if the IP has a reverse DNS. If not, reject the e-mail:

This is the mail system at host rootspirit.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<xxx@gmail.com>: host
gmail-smtp-in.l.google.com[2a00:1450:4013:c01::1b] said: 550-5.7.1
[2001:1af8:3100:a00a:21::1010 12] Our system has detected that
550-5.7.1 this message is likely unsolicited mail. To reduce the amount
of spam 550-5.7.1 sent to Gmail, this message has been blocked.
Please visit 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for 550 5.7.1 more information. df5si15766518wjb.42 - gsmtp (in reply to end of DATA command)

There is no difference if the mail is a one word e-mail or a wall of text that crits over 9000.

The easiest way to bypass this silly check is to set up a rDNS (reverse DNS or PTR) for all your IPv6 addresses on the mail server. If you do not have this set, Google will flag all your mails over IPv6 as spam.

If you run dig -x <IPv6 address> you can find out if it’s set (answer section, after “IN PTR”):

# dig -x 2001:1af8:3100:a00a:21::1010

; < <>> DiG 9.8.4-rpz2+rl005.12-P1 < <>> -x 2001:1af8:3100:a00a:21::1010
;; global options: +cmd
;; Got answer:
;; ->>HEADER< <- opcode: QUERY, status: NOERROR, id: 30041
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 13, ADDITIONAL: 0

;; QUESTION SECTION:
;0.1.0.1.0.0.0.0.0.0.0.0.1.2.0.0.a.0.0.a.0.0.1.3.8.f.a.1.1.0.0.2.ip6.arpa. IN PTR

;; ANSWER SECTION:
0.1.0.1.0.0.0.0.0.0.0.0.1.2.0.0.a.0.0.a.0.0.1.3.8.f.a.1.1.0.0.2.ip6.arpa. 21599	IN PTR mail.rootspirit.com.

Here is a work around if you cannot set rDNS. This still allows Google to send mail to you, using IPv6. The downside is that you'll have to do this for ALL Google Apps domains you send e-mail to. Good luck.

2 comments

  1. […] the server settings, I noticed we were using IPv6 to connect to the Gmail SMTP server. I found some other posts indicating that Gmail has problems finding the reverse DNS entry if you connect via IPv6, […]

Leave a Reply...