From 370b66c3a34cc4c533b1e63ae0bc9c69254ef54c Mon Sep 17 00:00:00 2001 From: Geert Hendrickx Date: Sun, 6 Feb 2022 17:44:53 +0100 Subject: [PATCH] When RequiredHeaders rejects a message, reply with the reason to do so. --- opendmarc/opendmarc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opendmarc/opendmarc.c b/opendmarc/opendmarc.c index 7c1eda6..17b1ebe 100644 --- a/opendmarc/opendmarc.c +++ b/opendmarc/opendmarc.c @@ -2446,6 +2446,12 @@ mlfi_eom(SMFICTX *ctx) dfc->mctx_jobid, reqhdrs_error); } + snprintf(replybuf, sizeof replybuf, + "RFC5322 requirement error: %s", reqhdrs_error); + + status = dmarcf_setreply(ctx, DMARC_REJECT_SMTP, + DMARC_REJECT_ESC, replybuf); + return SMFIS_REJECT; }