From 7b41e66aa59400cde70ecf1c8adb8c15fe99974f Mon Sep 17 00:00:00 2001 From: Geert Hendrickx Date: Sun, 6 Feb 2022 18:22:08 +0100 Subject: [PATCH] When RequiredFrom rejects a message, reply with the reason to do so. (equivalent to https://github.com/trusteddomainproject/OpenDMARC/pull/203 for RequiredHeaders) --- opendmarc/opendmarc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opendmarc/opendmarc.c b/opendmarc/opendmarc.c index c8b151c..b4a5c2b 100644 --- a/opendmarc/opendmarc.c +++ b/opendmarc/opendmarc.c @@ -2163,7 +2163,11 @@ mlfi_eom(SMFICTX *ctx) } if (conf->conf_reqfrom) + { + status = dmarcf_setreply(ctx, DMARC_REJECT_SMTP, DMARC_REJECT_ESC, + "RFC5322 requirement error: missing From field"); return SMFIS_REJECT; + } else return SMFIS_ACCEPT; }