a colon-separated list of signer domains and identities for the message.
For details see section &<<SECDKIMVFY>>&.
-.vitem &$dmarc_domain_policy$& &&&
+.vitem &$dmarc_alignment_spf$& &&&
+ &$dmarc_alignment_dkim$& &&&
+ &$dmarc_domain_policy$& &&&
&$dmarc_status$& &&&
&$dmarc_status_text$& &&&
&$dmarc_used_domains$&
The policy declared in the DMARC record. Valid values
are "none", "reject" and "quarantine". It is blank when there
is any error, including no DMARC record.
+
+.new
+.vitem &$dmarc_alignment_spf$&
+.vindex &$dmarc_alignment_spf$&
+The result of the SPF alignment portion of the test status;
+"yes" or "no".
+
+.vitem &$dmarc_alignment_dkim$&
+.vindex &$dmarc_alignment_dkim$&
+The result of the DKIM alignment portion of the test status;
+"yes" or "no".
+.wen
.endlist
.subsection Logging SSECDMARCLOGGING
6. A transport "socks_proxy" may expand to an empty string, specifying no
proxying.
+ 7. Variables $dmarc_alignment_spf and $dmarc_alignment_dkim.
+
Version 4.98
------------
1. The dkim_status ACL condition may now be used in data ACLs
{ "dkim_verify_status", vtype_module, US"dkim" },
#endif
#ifdef SUPPORT_DMARC
+ { "dmarc_alignment_dkim",vtype_module, US"dmarc" },
+ { "dmarc_alignment_spf", vtype_module, US"dmarc" },
{ "dmarc_domain_policy", vtype_module, US"dmarc" },
{ "dmarc_status", vtype_module, US"dmarc" },
{ "dmarc_status_text", vtype_module, US"dmarc" },
/* $variables */
+BOOL dmarc_alignment_dkim = FALSE; /* Subtest result */
+BOOL dmarc_alignment_spf = FALSE; /* Subtest result */
uschar * dmarc_domain_policy = NULL; /* Declared policy of used domain */
uschar * dmarc_status = NULL; /* One word value */
uschar * dmarc_status_text = NULL; /* Human readable value */
BOOL has_dmarc_record = TRUE;
u_char ** ruf; /* forensic report addressees, if called for */
+dmarc_alignment_spf = dmarc_alignment_dkim = FALSE;
+
/* ACLs have "control=dmarc_disable_verify" */
if (f.dmarc_disable_verify)
return OK;
if (has_dmarc_record)
{
+ dmarc_alignment_spf = sa == DMARC_POLICY_SPF_ALIGNMENT_PASS;
+ dmarc_alignment_dkim = da == DMARC_POLICY_DKIM_ALIGNMENT_PASS;
+
log_write(0, LOG_MAIN, "DMARC results: spf_domain=%s dmarc_domain=%s "
"spf_align=%s dkim_align=%s enforcement='%s'",
spf_sender_domain, dmarc_used_domain,
- sa==DMARC_POLICY_SPF_ALIGNMENT_PASS ?"yes":"no",
- da==DMARC_POLICY_DKIM_ALIGNMENT_PASS ?"yes":"no",
+ dmarc_alignment_spf ? "yes" : "no",
+ dmarc_alignment_dkim ? "yes" : "no",
dmarc_status_text);
history_file_status = dmarc_write_history_file(dkim_history_buffer);
/* Now get the forensic reporting addresses, if any */
We could provide it via a function but there's little advantage. */
static var_entry dmarc_variables[] = {
- { "dmarc_domain_policy", vtype_stringptr, &dmarc_domain_policy },
- { "dmarc_forensic_sender", vtype_stringptr, &dmarc_forensic_sender },
- { "dmarc_status", vtype_stringptr, &dmarc_status },
- { "dmarc_status_text", vtype_stringptr, &dmarc_status_text },
- { "dmarc_used_domain", vtype_stringptr, &dmarc_used_domain },
+ { "dmarc_alignment_dkim", vtype_bool, &dmarc_alignment_dkim },
+ { "dmarc_alignment_spf", vtype_bool, &dmarc_alignment_spf },
+ { "dmarc_domain_policy", vtype_stringptr, &dmarc_domain_policy },
+ { "dmarc_forensic_sender", vtype_stringptr, &dmarc_forensic_sender},
+ { "dmarc_status", vtype_stringptr, &dmarc_status },
+ { "dmarc_status_text", vtype_stringptr, &dmarc_status_text },
+ { "dmarc_used_domain", vtype_stringptr, &dmarc_used_domain },
};
misc_module_info dmarc_module_info =
logwrite = dmarc_status_text <$dmarc_status_text>
logwrite = dmarc_used_domain <$dmarc_used_domain>
logwrite = dmarc_domain_policy <$dmarc_domain_policy>
+ logwrite = dmarc_alignment_spf <$dmarc_alignment_spf>
+ logwrite = dmarc_alignment_dkim <$dmarc_alignment_dkim>
logwrite = ${authresults {$primary_hostname}}
# End
1999-03-02 09:44:33 10HmaX-000000005vi-0000 dmarc_status_text <None, Accept>
1999-03-02 09:44:33 10HmaX-000000005vi-0000 dmarc_used_domain <test.ex>
1999-03-02 09:44:33 10HmaX-000000005vi-0000 dmarc_domain_policy <none>
+1999-03-02 09:44:33 10HmaX-000000005vi-0000 dmarc_alignment_spf <no>
+1999-03-02 09:44:33 10HmaX-000000005vi-0000 dmarc_alignment_dkim <no>
1999-03-02 09:44:33 10HmaX-000000005vi-0000 Authentication-Results: myhost.test.ex;\n spf=none smtp.mailfrom=test.ex;\n dmarc=none header.from=test.ex
1999-03-02 09:44:33 10HmaX-000000005vi-0000 <= a@test.ex H=(testclient) [ip4.ip4.ip4.ip4] P=smtp S=sss
1999-03-02 09:44:33 10HmaY-000000005vi-0000 DMARC results: spf_domain=bloggs.com dmarc_domain=test.ex spf_align=no dkim_align=yes enforcement='Accept'
1999-03-02 09:44:33 10HmaY-000000005vi-0000 dmarc_status_text <Accept>
1999-03-02 09:44:33 10HmaY-000000005vi-0000 dmarc_used_domain <test.ex>
1999-03-02 09:44:33 10HmaY-000000005vi-0000 dmarc_domain_policy <none>
+1999-03-02 09:44:33 10HmaY-000000005vi-0000 dmarc_alignment_spf <no>
+1999-03-02 09:44:33 10HmaY-000000005vi-0000 dmarc_alignment_dkim <yes>
1999-03-02 09:44:33 10HmaY-000000005vi-0000 Authentication-Results: myhost.test.ex;\n spf=none smtp.mailfrom=bloggs.com;\n dkim=pass header.d=test.ex header.s=sel header.a=rsa-sha1;\n dmarc=pass header.from=test.ex
1999-03-02 09:44:33 10HmaY-000000005vi-0000 <= CALLER@bloggs.com H=(testclient) [ip4.ip4.ip4.ip4] P=smtp S=sss DKIM=test.ex id=qwerty1234@disco-zombie.net