Gmail blocking IPV6 emails? Here is the proper fix!

Our Score
Click to rate this post!
[Total: 0 Average: 0]
Gmail blocking IPV6 - Undelivered mail returned to sender
Gmail blocking IPV6 and returning mail with a Undelivered mail returned to sender response? Here is the fix!

Is Gmail blocking IPV6 emails from being sent?

Are you getting this error?

<name@gmail.com>: host
 gmail-smtp-in.l.google.com[2607:f8b0:400d:c01::1b] said: 550-5.7.1
 [2001:xxxx:xx:xxxx::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=ipv6_authentication_error for more 550
 5.7.1 information. 93si687833qkz.93 - gsmtp (in reply to end of DATA
 command)

Here is the proper fix. Not just a band aid!

 

GMAIL BLOCKING IPV6 EMAIL FIX

1) Edit the postfix main.cf:

nano /etc/postfix/main.cf

and add this line:

sender_dependent_default_transport_maps = hash:/etc/postfix/sender_transport

2) Edit the master file for your domains:

nano /etc/postfix/master.cf

domain1 unix -       -       n       -       -       smtp
 -o syslog_name=postfix-mail.yourdomain1.com
 -o smtp_helo_name=mail.yourdomain1.com
 -o smtp_bind_address=95.xxx.xxx.101
 -o smtp_bind_address6=2001:xxxx:xx:xxxx::1

domain2 unix -       -       n       -       -       smtp
 -o syslog_name=postfix-mail.yourdomain2.com
 -o smtp_helo_name=mail.yourdomain2.com
 -o smtp_bind_address=95.xxx.xxx.102
 -o smtp_bind_address6=2001:xxxx:xx:xxxx::2

domain3 unix -       -       n       -       -       smtp
 -o syslog_name=postfix-mail.yourdomain3.com
 -o smtp_helo_name=mail.yourdomain3.com
 -o smtp_bind_address=95.xxx.xxx.103
-o smtp_bind_address6=2001:xxxx:xx:xxxx::3

 

3) Add your transport maps:

nano /etc/postfix/sender_transport

you need to add:

@yourdomain1.com               domain1:
@yourdomain2.com               domain2:
@yourdomain3.com               domain3:

4) Run this command:

postmap /etc/postfix/sender_transport

5) Then restart postfix:

systemctl restart postfix;

Be sure to change yourdomain#.com to your domains and both “address” and “address6” to your ips. Now test your email to be sure the new settings work with Gmail by checking you email headers, don’t just send one email do a few to be sure. Gmail blocking IPV6 emails should stop happening and you’re ready for the future when IPV6 becomes the norm.

 

ALTERNATIVE FIX #1 FORCING GMAIL TO SEND WITH IPV4 ONLY

1) Forcing postfix to send gmail through IPv4 instead of IPv6, edit your main.cf
nano /etc/postfix/main.cf

and add this line:

transport_maps = hash:/etc/postfix/transport

2) Now we need to create a new file and a new entry in the transport table:
nano /etc/postfix/transport

you need to add:

 gmail.com smtp-ipv4:

3) Now create a new rule for this new entry and define it to only use IPv4:

nano /etc/postfix/master.cf

you need to add:

smtp-ipv4 unix .. .. .. .. smtp
 -o inet_protocols=ipv4

4) Last, run the postmap command and restart postfix:

postmap /etc/postfix/transport;

systemctl restart postfix;

Now test your email to make sure it works with Gmail by checking you email headers, one email may not be enough; do a few to be sure.

ALTERNATIVE FIX #2 TURN OFF IPV6

1) Forcing Postfix to use IPv4 for all email:

nano /etc/postfix/main.cf

Find:

inet_protocols = all

Change to:

inet_protocols = ipv4

2) Restart Postfix service:

systemctl restart postfix;

Postfix will now only use IPV4 instead of IPV6 for all email sending. Again, test your email to make sure it works with Gmail by checking you email headers, one email may not be enough; do a few to be sure.

References:

https://christian.skala.me/blog/gmail-why-are-you-doing-this-to-me/

https://kb.plesk.com/en/125908

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.