1

Topic: DMARC error when mails are forwarded to GMail

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

I'm using iredmail in "myserver" to forward all the mails received for user@mydomain.com to gmailuser@gmail.com

No problem in 99 % of cases, but when I receive a mail from a VIP client (user@otherdomain.com) Gmail bounces it and return me this error :

Feb  2 08:44:09 myserver postfix/smtp[3079]: 35EC520083: to=<gmailuser@gmail.com>, relay=gmail-smtp-in.l.google.com[66.102.1.26]:25, delay=0.13, delays=0/0/0.06/0.06, dsn=5.7.26, status=bounced (host gmail-smtp-in.l.google.com[66.102.1.26] said: 550-5.7.26 Unauthenticated email from otherdomain.com is not accepted due to domain's 550-5.7.26 DMARC policy. Please contact the administrator of otherdomain.com domain if 550-5.7.26 this was a legitimate mail. Please visit 550-5.7.26  https://support.google.com/mail/answer/2451690 to learn about the 550 5.7.26 DMARC initiative. p10si8519147wrm.536 - gsmtp (in reply to end of DATA command))

user@otherdomain.com > user@mydomain.com > gmailuser@gmail.com

GMail is receiving from @mydomain IP but the teorical sender is @otherdomain.com, so DMARC policy fails ...

I'm very newbie in iredmail, please, what I'm doing wrong ???

Thanks a lot ...

----

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

2 (edited by CrashXRU 2020-02-07 11:23:18)

Re: DMARC error when mails are forwarded to GMail

Google has good documentation on this issue.

you need to tidy up some dns records (spf,dkim,dmarc) and then the forward should work without problems

3

Re: DMARC error when mails are forwarded to GMail

CrashXRU wrote:

Google has good documentation on this issue.

you need to tidy up some dns records (spf,dkim,dmarc) and then the forward should work without problems

Thanks for your answer CrashXRU, but I think I have not explained well ...

I will try to explain simpler ...

Domain A : My customer domani. Not under my control
Domain B : My own corporative domain
Domain C : GMail ... I'm using GMail to manage my corporative email, so ALL mails sent to Domain B are forwarded to Domain C (Gmail) by iredmail server.

When A send a mail to B my iredmail server forward the email to C. C (Gmail) is receinving mail from B server but the "from" in the email is A, so, GMail (C) detects an email from B (iredmail server IP) sent in name of A ...

If DMARC in DNS of Domain A is well configured, GMail is detectin that B is sending in the name of A but it's not authorized to do this ... Mails from Domain A must come from A sersev IP indicated in DMARC ...

DMARC DNS records in domain B (my corporative domain) is well configured ... But I have no control over Domain A (my customer mail server) ...

Any idea about this issue ??

Thanks a lot for your help

4

Re: DMARC error when mails are forwarded to GMail

You need to enable SRS on your iRedMail server for forwarding.
FYI: https://docs.iredmail.org/srs.html

5

Re: DMARC error when mails are forwarded to GMail

ZhangHuangbin wrote:

You need to enable SRS on your iRedMail server for forwarding.
FYI: https://docs.iredmail.org/srs.html

Hi, Thanks a lot for your support ...

Best regards,