1

Topic: Gmail block my mail

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version: CentOS Linux release 7.6.1810 (Core)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx + php 7.2
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Good morning, everyone,

I recently had to reinstall my server due to security issues.
I backup my emails every day so I didn't think much about it and reinstalled it.
The problem is that to date, Gmail very often blocks my sent emails :

Mar 26 06:46:37 srv-main postfix/smtp[12230]: 44T0W12Y38zj5: to=<sephy84@gmail.com>, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c0a::1b]:25, delay=0.48, delays=0.02/0.03/0.12/0.32, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[2a00:1450:400c:c0a::1b] said: 550-5.7.1 [2001:bc8:4400:2c00::7:10b] The IP address sending this message does 550-5.7.1 not have a PTR record setup. As a policy, Gmail does not accept 550-5.7.1 messages from IPs with missing PTR records. Please visit 550-5.7.1  https://support.google.com/mail/answer/81126#authentication for more 550 5.7.1 information. s6si11262704wrw.27 - gsmtp (in reply to end of DATA command))

Mar 26 06:46:47 srv-main postfix/smtp[12230]: 44T0WC2yl8zj5: to=<sephy84@gmail.com>, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c0a::1b]:25, delay=0.24, delays=0.01/0.01/0.05/0.16, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[2a00:1450:400c:c0a::1b] said: 550-5.7.1 [2001:bc8:4400:2c00::7:10b] The IP address sending this message does 550-5.7.1 not have a PTR record setup. As a policy, Gmail does not accept 550-5.7.1 messages from IPs with missing PTR records. Please visit 550-5.7.1  https://support.google.com/mail/answer/81126#authentication for more 550 5.7.1 information. h17si9504846wrr.384 - gsmtp (in reply to end of DATA command))

I have carried out all the appropriate checks such as SPF, DKIM, Dmarc.

v=spf1 a mx a:magri.email a:zulberti.it a:sempai.it ip4:51.15.199.251 -all
v=DMARC1; p=none; rua=mailto:904e251f@mxtoolbox.dmarc-report.com; ruf=mailto:904e251f@forensics.dmarc-report.com; rf=afrf; sp=none; fo=0; pct=100; ri=86400; adkim=r; aspf=r

I checked if the IP of my server falls within some blocklist and is clean instead.

I also checked the server side and I have not found anything wrong in its configuration and both on mail-tester.com and mxtoolbox.com and it is everything

The only thing I noticed was that the return alert from google always refers to the IPv6 address.

Do you have any suggestions?

Thank you for your support.

Regards,
LainX84

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Gmail block my mail

Found the issue.
That server is a VPS over Scaleway.
They do not provide PTR support on IPv6 because at each reboot of the machine they assign a random IPv6 while IPv4 is fixed and only in that case you can edit the PTR.

Additional i've set the postfix "main.cf" with that and restart postfix :

inet_protocols=ipv4

For how have that issue and have correct PTR over IPv6 i found that additional for postfix :

# Gmail IPv6 retry:
smtp_reply_filter = pcre:/etc/postfix/smtp_reply_filter
# Convert Google Mail IPv6 complaint permanent error into a temporary error.
# This way Postfix will attempt to deliver this e-mail using another MX
# (via IPv4).
/^5(\d\d )5(.*. \S+ - gsmtp.*)/ 4${1}4$2

3

Re: Gmail block my mail

Thanks for sharing. smile