#1086707 dmarc mitigations should be enabled by default or at least configurable

Package:
mailman3
Source:
mailman3
Submitter:
Antoine Beaupre
Date:
2024-11-04 15:09:01 UTC
Severity:
normal
Tags:
#1086707#5
Date:
2024-11-04 14:55:58 UTC
From:
To:
Mailman 3, out of the box, doesn't do any sort of DMARC
mitigation. This implies that it's impossible to deliver mail to
standards-conforming providers (e.g. Google, but also others) by
default, as the From: header will most likely not match the domain
used to match SPF signatures (among many other problems).

In our setup, we ended up using a bit of code like this:

```
from mailman.interfaces.mailinglist import DMARCMitigateAction, ReplyToMunging


def mitigate_dmarc(mlist):
    mlist.dmarc_mitigate_action = DMARCMitigateAction.munge_from
    mlist.dmarc_mitigate_unconditionally = True
```

Which we call with "withlist" to tweak the mailing list after
creation.

But I somewhat feel this should be the default. It's not clear what
upstream thinks, so far conversations about this have been relatively
unclear:

https://gitlab.com/mailman/mailman/-/issues/1181

Apparently, there's a way to make styles to workaround this issue, but
I don't think this is serving our users well.

So I feel we should just patch Mailman (as suggested by upstream) to
fix the default.

Thoughts?