1

Topic: "gmail.com loops back to myself"

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

Version 0.9.9
Ubuntu 18.04
MySQL
Nginx
not pro

I am able to send emails to all domains I have tried so far EXCEPT gmail.com (been using iRedMail on this server for a long time, well over a year, maybe years, I've lost track).  Apparently I do not email gmail accounts often because I recently discovered that I receive loopback errors whenever any of my domains send mail to gmail.  I have verified PTR records for each domain, have working DMARC for each domain, and have verified all the domains with Google Postmaster.  None of my domains are any blacklists as far as I can surmise and my IP address is not blacklisted anywhere I can find, either.

Sample log:

20:12:00 reverse_proxy postfix/submission/smtpd[38034]: connect from _gateway[10.0.1.1]
Apr  6 20:12:00 reverse_proxy postfix/submission/smtpd[38034]: Anonymous TLS connection established from _gateway[10.0.1.1]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Apr  6 20:12:00 reverse_proxy postfix/submission/smtpd[38034]: 48x1sX2LSPz6vlV: client=_gateway[10.0.1.1], sasl_method=PLAIN, sasl_username=<me@mydomain.com
Apr  6 20:12:00 reverse_proxy postfix/cleanup[38042]: 48x1sX2LSPz6vlV: message-id=<7258DAE7-8D5E-4372-882D-9C01D51EE528@<mydomain.com>
Apr  6 20:12:00 reverse_proxy postfix/qmgr[37991]: 48x1sX2LSPz6vlV: from=<me@mydomain.com>, size=593, nrcpt=1 (queue active)
Apr  6 20:12:00 reverse_proxy postfix/10025/smtpd[38049]: connect from mail_server[127.0.0.1]
Apr  6 20:12:00 reverse_proxy postfix/10025/smtpd[38049]: 48x1sX3RZ3z6vmF: client=mail_server[127.0.0.1]
Apr  6 20:12:00 reverse_proxy postfix/cleanup[38042]: 48x1sX3RZ3z6vmF: message-id=<7258DAE7-8D5E-4372-882D-9C01D51EE528@brightmarkllc.com>
Apr  6 20:12:00 reverse_proxy postfix/qmgr[37991]: 48x1sX3RZ3z6vmF: from=<me@mydomain.com>, size=1763, nrcpt=1 (queue active)
Apr  6 20:12:00 reverse_proxy amavis[118596]: (118596-08) Passed CLEAN {RelayedInternal}, ORIGINATING LOCAL [10.0.1.1]:60277 <me@mydomain.com> -> <target@gmail.com>, Queue-ID: 48x1sX2LSPz6vlV, Message-$
Apr  6 20:12:00 reverse_proxy postfix/10025/smtpd[38049]: disconnect from mail_server[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Apr  6 20:12:00 reverse_proxy postfix/amavis/smtp[38047]: 48x1sX2LSPz6vlV: to=<user@gmail.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.21, delays=0.04/0.01/0/0.16, dsn=2.0.0, status=sent (250 2.0.0 from MT$
Apr  6 20:12:00 reverse_proxy postfix/qmgr[37991]: 48x1sX2LSPz6vlV: removed
Apr  6 20:12:00 reverse_proxy postfix/postscreen[38051]: CONNECT from [::1]:44042 to [::1]:25
Apr  6 20:12:00 reverse_proxy postfix/postscreen[38051]: WHITELISTED [::1]:44042
Apr  6 20:12:00 reverse_proxy postfix/smtpd[38052]: connect from localhost6.localdomain6[::1]
Apr  6 20:12:00 reverse_proxy postfix/smtp[38050]: warning: host gmail-smtp-in.l.google.com[::]:25 greeted me with my own hostname mail_server.mydomain.com
Apr  6 20:12:00 reverse_proxy postfix/smtp[38050]: warning: host gmail-smtp-in.l.google.com[::]:25 replied to HELO/EHLO with my own hostname mail_server.mydomain.com
Apr  6 20:12:00 reverse_proxy postfix/smtp[38050]: 48x1sX3RZ3z6vmF: to=<user@gmail.com>, relay=gmail-smtp-in.l.google.com[::]:25, delay=0.16, delays=0.01/0.03/0.12/0, dsn=5.4.6, status=bounced (mail for gmail$
Apr  6 20:12:00 reverse_proxy postfix/smtpd[38052]: disconnect from localhost6.localdomain6[::1] ehlo=1 quit=1 commands=2
Apr  6 20:12:00 reverse_proxy postfix/cleanup[38042]: 48x1sX4ZJNz6vp1: message-id=<48x1sX4ZJNz6vp1@mail_server.mydomain.com>
Apr  6 20:12:00 reverse_proxy postfix/qmgr[37991]: 48x1sX4ZJNz6vp1: from=<>, size=3844, nrcpt=1 (queue active)
Apr  6 20:12:00 reverse_proxy postfix/bounce[38053]: 48x1sX3RZ3z6vmF: sender non-delivery notification: 48x1sX4ZJNz6vp1
Apr  6 20:12:00 reverse_proxy postfix/qmgr[37991]: 48x1sX3RZ3z6vmF: removed


Any thoughts how to be able to send email to gmail?

----

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

2

Re: "gmail.com loops back to myself"

checked /etc/hosts?

3

Re: "gmail.com loops back to myself"

ZhangHuangbin wrote:

checked /etc/hosts?

What am I checking the /etc/hosts file for?  What is gmail.com specific in that?

4

Re: "gmail.com loops back to myself"

Okay, I figured out my problem.  The MX host gmail-smtp-in.l.google.com was being flagged in my setup as a bad Google site (I try hard to weed out trackers and the like).  I'm a bit embarrassed to find this was the problem, but happy that my configuration was otherwise good.  Posting here in case someone searches in the future and comes across this, too.