1 (edited by ngonzalezi 2019-10-30 07:24:59)

Topic: mail for gmail.com loops back to myself

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

Hello,

I just installed iRedMail into a virtual server and i followed this guide

https://docs.iredmail.org/install.iredm … our-server

Everything was installed without any errors and i changed the default web ports from 80 to 8080 and 443 to 8443 since i'm running another web server under the same public ip in a different box.

I updated iptables rules, 000-default.conf and default-ssl.conf and apache ports.conf files to point to the custom ports.

At this point everything work just fine, i also verified that ports were opened in my router and pointing into the right internal IP.

I configured my email client to match the server address mail.mydomain.com and it connected just fine.

I can receive emails from any email domain but when i try to send an email it automatically bounce with the following error message:

This is the mail system at host mail.mydomain.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

<user@gmail.com>: mail for gmail.com loops back to myself

Mail.log is as follows:

Oct 29 18:16:09 mail postfix/10025/smtpd[5685]: connect from mail.mydomain.com[127.0.0.1]
Oct 29 18:16:09 mail postfix/10025/smtpd[5685]: 84AA4E2D71: client=mail.mydomain.com[127.0.0.1]
Oct 29 18:16:09 mail postfix/cleanup[5675]: 84AA4E2D71: message-id=<a6649d8c-11e1-35b5-e983-1aaee1f7c650@mydomain.com>
Oct 29 18:16:09 mail postfix/qmgr[1604]: 84AA4E2D71: from=<me@mydomain.com>, size=1794, nrcpt=1 (queue active)
Oct 29 18:16:09 mail amavis[1631]: (01631-02) Passed CLEAN {RelayedInternal}, ORIGINATING LOCAL [201.240.217.121]:6439 [201.240.217.121] <me@mydomain.com> -> <someuser@gmail.com>, Queue-ID: 52D82E2D70, Message-ID: <a6649d8c-11e1-35b5-e983-1aaee1f7c650@mydomain.com>, mail_id: l9sBU9_ICBSx, Hits: -1, size: 667, queued_as: 84AA4E2D71, dkim_new=dkim:mydomain.com, 2188 ms, Tests: [ALL_TRUSTED=-1]
Oct 29 18:16:09 mail postfix/10025/smtpd[5685]: disconnect from mail.mydomain.com[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Oct 29 18:16:09 mail postfix/amavis/smtp[5680]: 52D82E2D70: to=<someuser@gmail.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=2.3, delays=0.09/0.01/0/2.2, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 84AA4E2D71)
Oct 29 18:16:09 mail postfix/qmgr[1604]: 52D82E2D70: removed
Oct 29 18:16:09 mail postfix/smtp[5686]: 84AA4E2D71: to=<someuser@gmail.com>, relay=none, delay=0.14, delays=0.01/0.02/0.11/0, dsn=5.4.6, status=bounced (mail for gmail.com loops back to myself)
Oct 29 18:16:09 mail postfix/cleanup[5675]: A91F2E2D73: message-id=<20191029231609.A91F2E2D73@mail.mydomain.com>
Oct 29 18:16:09 mail postfix/bounce[5687]: 84AA4E2D71: sender non-delivery notification: A91F2E2D73
Oct 29 18:16:09 mail postfix/qmgr[1604]: A91F2E2D73: from=<>, size=3736, nrcpt=1 (queue active)
Oct 29 18:16:09 mail postfix/qmgr[1604]: 84AA4E2D71: removed
Oct 29 18:16:09 mail postfix/pipe[5688]: A91F2E2D73: to=<me@mmydomain.com>, relay=dovecot, delay=0.04, delays=0/0.01/0/0.03, dsn=2.0.0, status=sent (delivered via dovecot service)
Oct 29 18:16:09 mail postfix/qmgr[1604]: A91F2E2D73: removed


I have been trying to get this fix for hours now and i can't seem to find the issue. This happens to any email domain i try to send an email unless it is my same domain name, so internally it's just working fine.

If anyone could help me with this matter i will really appreciate it and if more info is needed i will be glad to share it.

Thank you

----

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

2

Re: mail for gmail.com loops back to myself

- Why did you install with iRedMail-0.9.7 but not iRedMail-0.9.9? We don't use Apache anymore.
- Do you use a working DNS server in /etc/resolv.conf and /var/spool/postfix/etc/resolv.conf?
- Did you add "gmail.com" as a mail domain on your server?

3

Re: mail for gmail.com loops back to myself

Hello,

Thanks for your reply,

I installed that version because i like apache more than nginx and it's easier for me to configure it.

I checked those files and everything is fine.

I believe the problem is on my network. I did the same installation after posting the first message in a cheap VPS and everything worked amazing out of the box.

I may try reinstalling everything at my home server and see how does it goes.

Thank you