大网数据广告活动
服务器运维问答

Why does DMARC fail for forwarded emails from this particular domain when it passes for all other domains?

· 52CE 我爱测

I run a virtual mail server that forwards emails to my domain to a Gmail address, and I use PostSRSd to rewrite the addresses. For example, if someone sends an email to [email omitted] , my mail server will rewrite the address (t…

问题原文

原帖链接 · John Doe · CC BY-SA 4.0

I run a virtual mail server that forwards emails to my domain to a Gmail address, and I use PostSRSd to rewrite the addresses. For example, if someone sends an email to [email omitted], my mail server will rewrite the address (to something like [email omitted]) and forward it to my email at [email omitted].

This rewriting is essential, because otherwise the forwarded emails will fail SPF checks. I'm not sure if it will fail DKIM if the address is not rewritten, but I assume it will.

PostSRSd works out well for us most of the time. Emails to our virtual domain pass SPF, DKIM and DMARC, which makes deliverability excellent. Here's the typical mail header for the checks:

Authentication-Results: mx.google.com;
   dkim=pass header.i=@bf08x.hubspotemail.net header.s=hs1 header.b=fFjMRTbn;
   dkim=pass header.i=@imago-images.de header.s=hs2-8105018 header.b=AHU209VN;
   spf=pass (google.com: domain of srs0=8nnb=bp=bf08x.hubspotemail.net=1axb6baq5yhbqc79kzmzee6yv7e5d09kmo07f2-john=[email omitted] designates 123.234.123.124 as permitted sender) smtp.mailfrom="SRS0=8nNb=BP=bf08x.hubspotemail.net=1axb6baq5yhbqc79kzmzee6yv7e5d09kmo07f2-john=[email omitted]";
   dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=imago-images.de

However, emails from a particular domain ichat.sp.edu.sg (this is the actual domain) never get delivered if they try to send emails to my domain, because the forwarding process causes it to fail Gmail's DMARC checks. Here is the mail header for one such mail:

Authentication-Results: mx.google.com;
   dkim=pass header.i=@ichatspedu.onmicrosoft.com header.s=selector2-ichatspedu-onmicrosoft-com header.b="LeXRlSh/";
   arc=pass (i=1 spf=pass spfdomain=ichat.sp.edu.sg dkim=pass dkdomain=ichat.sp.edu.sg dmarc=pass fromdomain=ichat.sp.edu.sg);
   spf=pass (google.com: domain of srs0=0ah0=bj=ichat.sp.edu.sg=[email omitted] designates 123.234.123.124 as permitted sender) smtp.mailfrom="SRS0=0aH0=BJ=ichat.sp.edu.sg=[email omitted]";
   dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sp.edu.sg

I'm not sure what causes DMARC to fail in this particular case. ChatGPT (as well as Postfix) says it has something to do with the DMARC records of sp.edu.sg, but I'm not very sure what it is. Can anyone help? And can I do anything on my end to alleviate this if sp.edu.sg does not do anything?

For reference, here is the TXT record for _dmarc.sp.edu.sg:

v=DMARC1; p=reject; rua=mailto:[email omitted], mailto:[email omitted]; ruf=mailto:[email omitted]; fo=1

已采纳解答

原帖链接 · AngryCarrotTop · CC BY-SA 4.0

DMARC not only requires that SPF or DKIM PASS, but it also requires the domains used by either one of those two protocols to ALIGN with the domain found in the “From” address. Only then will DMARC PASS.

DKIM: ichatspedu.onmicrosoft.com

SPF: ichat.sp.edu.sg

header.from=sp.edu.sg

so this wont work. I assume in the mail that worked you redacted a imago-images.de email address in the SPF ([email omitted]) ?

try adding a subdomain TXT DMARC for ichat.sp.edu.sg rather than rely on default (empty) sp tag on parent domain.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2023-05-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。