Hello,
the DMARC Mitigation action “Replace From: with list address” is evaluated in mailman/handlers/dmarc.py:munged_headers(). In the case, where From: is a non-member email address, without display part, which non-member may post, this happens:
realname = email realname = re.sub(r'@([^ .]+\.)+[^ .]+$', '---', realname) with _.using(mlist.preferred_language.code): via = _('${realname} via ${mlist.display_name}') display_name = str(Header(via, mlist.preferred_language.charset)) value = [('From', formataddr((display_name, mlist.posting_address)))]
In short, if a@b is a non-member, who may post to mailing list “E <c@d>”, and b is DMARC-protected, the final distrubuted email will have
From: "a--- via E <c@d>" Reply-To: a@b
compare to the IETF mailing lists, which would send: From: <a=40b@d> where a and b are from a@b, d is from c@d
The bottom of https://answers.uillinois.edu/illinois/page.php?id=86787 describes the mitigariton options offered by Sympa:
display name From: User Name <listName@lists.illinois.edu>
display name and e-mail From: “User Name” (userEmail@address.com) < listName@lists.illinois.edu >
email “via Mailing List” From: “User Name” (userEmail@address.com via listName Mailing List) <listName@lists.illinois.edu>
name “via Mailing List” From: “User Name” <listName@lists.illinois.edu> (the website likely means:) From: “User Name via listName” <listName@lists.illinois.edu>
As can be seen, the other MLMs do not replace domains with --- . I find ugly the --- , inserted by mailman. In my real-world case the From: is aaa@example.org, the ML name is aaa@l.example.org (localname is the same, the domains are different). The result is:
From: aaa--- via Aaa <aaa@l.example.org>
So there is twice trippe-A and @example.org disappeared. Mentioning twice AAA in the display name in this case really has to added value.
That said, I propose removing now the line
realname = re.sub(r'@([^ .]+\.)+[^ .]+$', '---', realname)
and in the future offer as options: From: User Name <listName@lists.illinois.edu> From: “User Name” (userEmail@address.com) < listName@lists.illinois.edu > From: “User Name” (userEmail@address.com via listName Mailing List) <listName@lists.illinois.edu> From: “User Name via listName” <listName@lists.illinois.edu>