You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2026/03/13 18:45:04 UTC
[Bug 8375] New: AuthRes plugin fails to parse Authentication-Results with "published-domain-policy" property
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8375
Bug ID: 8375
Summary: AuthRes plugin fails to parse Authentication-Results
with "published-domain-policy" property
Product: Spamassassin
Version: 4.0.2
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Plugins
Assignee: dev@spamassassin.apache.org
Reporter: ermanno.scaglione@boiafauss.eu
Target Milestone: Undefined
I am using SpamAssassin version 4.0.2-rc2 on Ubuntu 25.10. The AuthRes plugin
fails to parse valid Authentication-Results headers generated locally by
fastmails's athentication-milter
(https://github.com/fastmail/authentication_milter).
The parser skips the entire header when it encounters the
"published-domain-policy" property within the DMARC section, even though this
is a valid property according to IANA assignments for Email Authentication
Results.
Debug logs:
Mar 13 17:34:20.806 [362282] dbg: authres: parsing Authentication-Results:
mail.boiafauss.eu; arc=pass (as.2.google.com=pass, ams.2.google.com=pass,
as.1.google.com=pass, ams.1.google.com=pass)
smtp.remote-ip=xxxx:xxxx:xxxx:xxxx::xx; dkim=pass (1024-bit rsa key sha256)
header.d=domain.tld header.i=@omain.tld header.b=e+qJHyq1 header.a=rsa-sha256
header.s=20170426; dmarc=pass policy.published-domain-policy=none
policy.applied-disposition=none policy.evaluated-disposition=none
(p=none,d=none,d.eval=none) policy.policy-from=p header.from=sub.domain.tld;
iprev=pass smtp.remote-ip=xxxx:xxxx:xxxx:xxxx::xx (mail-vk1-xa34.google.com);
spf=pass smtp.mailfrom="xxxxxxxx@gmail.com" smtp.helo=mail-vk1-xa34.google.com;
x-aligned-from=fail; x-google-dkim=fail (message has been altered, 2048-bit rsa
key) header.d=1e100.net header.i=@1e100.net header.b=tQ/gSQIW; x-ptr=pass
smtp.helo=mail-vk1-xa34.google.com policy.ptr=mail-vk1-xa34.google.com;
x-return-mx=pass header.domain=sub.domain.tld policy.org_domain=domain.tld
policy.is_org=no (MX Records found: relay-avs.domain.tld); x-return-mx=pass
smtp.domain=gmail.com policy.is_org=yes (MX Records found:
alt3.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com);
x-tls=pass smtp.version=TLSv1.3 smtp.cipher=TLS_AES_128_GCM_SHA256
smtp.bits=128
Mar 13 17:34:20.806 [362282] dbg: authres: skipping header, unknown property
for dmarc/policy: published-domain-policy
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 8375] AuthRes plugin fails to parse Authentication-Results with "published-domain-policy" property
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8375
Kent Oyer <ke...@mxguardian.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kent@mxguardian.net
--- Comment #1 from Kent Oyer <ke...@mxguardian.net> ---
Fixed in r1932298.
Rewrite AuthRes plugin to use new Header::AuthenticationResults parser
The AuthRes plugin previously hand-rolled a fragile A-R header parser that
died (discarding the entire header) on unknown methods or properties.
Real-world headers from servers like Mail::Milter::Authentication include
extended properties (policy.published-domain-policy) and non-standard
methods (x-tls) that caused valid results to be skipped.
Create Mail::SpamAssassin::Header::AuthenticationResults, inheriting from
ParameterHeader, which handles the structural parsing (comment stripping,
semicolon tokenization, quoted strings, line unfolding). The subclass adds
A-R-specific secondary parsing of method results and ptype.property=value
pairs.
Simplify the AuthRes plugin to use the new class. Remove the hand-rolled
parser (regex constants, skip_cfws, the old parse_authres), the method/
property whitelists, and ARC handling (handled in other plugins). All
parsed methods and properties now flow through to $pms->{authres_parsed}
regardless of whether they appear in a whitelist, so check_authres_result
works for any method present in the header.
The $pms->{authres_parsed} and $pms->{authres_result} structures are
preserved for compatibility with other plugins.
--
You are receiving this mail because:
You are the assignee for the bug.