Gerald Vogt writes:
Currently, mails from our own domain have the From header rewritten with the list address because we have a dmarc policy published.
Is there a simple way to [avoid] this?
Not really. The point of the include list is that at least one large provider (GMail) has policy p=none but in fact does DMARC From alignment checking on mail with itself as source and destination. This fails safe. Since they lie, you have to configure it by hand (except GMail, since we know about them, they're in the include list by default).
An exclude list is a potential vulnerability unless you're carefully configured. Suppose somebody spoofs your domain in From. If this gets to Mailman, it will go back out and bounce all over the Internet when the DKIM validation fails, and it's April 2014 all over again for you.
I think if your MTA does all of the following
- Disallow incoming mail From: your domain that fails DMARC
- Strip incoming DKIM signatures for your domain (multiple signatures from the same domain are not always properly implemented -- any signature passing should be a pass but some implementations get this wrong)
- DKIM sign all outgoing mail From: your domain you're probably OK, but do not quote me on that, I haven't thought about it carefully.
The most straightforward dodge I can think of would be to have a rule in your MTA that rewrites you@your.dom to you@your.dom.invalid on the way in to Mailman, and reverses that on the way out.
Or you could add
# The strings in the parenthesized list should be all lowercase
# All of these domains MUST be covered by your outgoing DKIM
# signature
for domain in ("@your.dom", "@subdom.your.dom"):
if email.endswith(domain):
return False
just after the "email = email.lower()" in the def of maybe_mitigate at about line 285 of mailman/rules/dmarc.py. (If you're not a Python programmer, note that the "f" in "for" above must align exactly with the leading "e" in "email = email.lower()" or Python will give you a syntax error and Mailman will probably crash on startup.)
For the reasons above, I'm not interested in adding this to Mailman myself, but you can file an issue in our GitLab tracker (project mailman, repo mailman) and maybe somebody else will pick it up.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan