11

I am setting up a new server and discovered that Gmail does not accept emails from this server.

I checked Exim logfiles and found the following:

Our system has detected that this\n550-5.7.1 message does not meet IPv6 sending guidelines regarding PTR records\n550-5.7.1 and authentication.
Please review\n550 5.7.1 https://support.google.com/mail/answer/81126 for more information. om7si10023450wjc.42 - gsmtp

My server has IP4 and IPv6 ip addresses. I have added SPF records for both IP4 and IPv6 IP addresses. The only thing is that I don't have PTR records yet (my data center does not allow to add PTR records if A record does not point to the same server). So, I will PTR records later when I move websites to the new server.

My question: is it possible that Gmail does not accept emails just because I don't have PTR records? All email providers in similar situations just put emails in Spam or Bulk mail folders. Gmail does not accept mails at all?

4 Answers 4

8

Here is the text from google's help page:

Additional guidelines for IPv6

  • The sending IP must have a PTR record (i.e., a reverse DNS of the sending IP) and it should match the IP obtained via the forward DNS resolution of the hostname specified in the PTR record. Otherwise, mail will be marked as spam or possibly rejected.
  • The sending domain should pass either SPF check or DKIM check. Otherwise, mail might be marked as spam.

So, yes, if you use IPv6 to deliver your mail to Google, you MUST have a PTR matching the sending's system IPv6 address.

If you really can't create a PTR for your IPv6 address (which seems weird to me), the solution is to either disable IPv6 completely or to setup your main server to prefer IPv4 for outgoing connections. Don't forget to change the SPF record as well if you do that.

2

A temporary workaround, (i.e. this is not a permanent solution) is to disable ipv6 in exim4.

In file: /etc/exim4/conf.d/main/02_exim4-config_options Add the line:

disable_ipv6=true

Then run the command

update-exim4.conf

And restart the service

service exim4 restart

Presto, exim4 has no ipv6.

2
  • @John This answer was from 6 years ago. Google insists on the full configuration of PTR for IPv6 now.
    – user96622
    Oct 11, 2022 at 14:22
  • thanks for reminding me i wrote that. I had forgotten and added my experience as an answer below.
    – John
    Oct 24, 2022 at 21:34
1

Well, yes (https://support.google.com/mail/answer/81126):

Additional guidelines for IPv6
The sending IP must have a PTR record (i.e., a reverse DNS of the sending IP) 
and it should match the IP obtained via the forward DNS resolution of the 
hostname specified in the  PTR record. Otherwise, mail will be marked as spam
or possibly rejected.

If you cannot set PTR records yet, it's probably better to disable sending mails via IPv6 until you can.

1
  • Thanks. I hate IPv6 and would like to disable sending mails via IPv6 but it looks that this can not be done just in Exim but I have to disable IP66 on my server.
    – user189078
    Sep 11, 2013 at 12:32
1

I recently struggled with this issue. I thought I must be using split configuration since I was using Ubuntu, but the exim installation was pre-installed by my VPS provider and I was not using split configuration. I use other MTAs (on different VPS) and it was only exim that was having this issue with IPv6 and Gmail.

user96622's answer /etc/exim4/conf.d/main/02_exim4-config_options belongs in the main section of /etc/exim4/exim4.conf.template for me:

disable_ipv6 = true

I made exim re-read this configuration:

:~$ sudo update-exim4.conf

I checked, it really had:

:~$ sudo exim -bP disable_ipv6
disable_ipv6

That was enough to get my email accepted into Gmail servers. sendmail -v blahblahblah

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .