[Mailman-Users] DMARC hack
Stephen J. Turnbull
stephen at xemacs.org
Sun May 24 15:10:50 CEST 2015
Allan Hansen writes:
> 69,74d68
> <
> < # Added to deal with DMARC issuej
> < name, addrs = parseaddr(msg.get('from'))
> < addrs += '.invalid'
This is known to be a bad idea, as it increases the spam score at many
sites (because the author's mail domain doesn't resolve). Subscribers
at such sites may have trouble receiving mail, and your list(s) may be
tagged as suspicious.
I would recommend the From-munging approach:
name, addr = parseadder(msg.get('from'))
if addr.endswith('aol.com') or addr.endswith('yahoo.com'):
# I forget what happens if it's a bare address
name = "%s (%s) via list" % (name if name else "Anonymous", addr)
addr = <list-post address>
del msg['from']
msg['from'] = formataddr((name, addr))
Mark (or you) probably have better code, and in some cases you may
want to add the addr to the Reply-To field.
> < del msg['from']
> < msg['from'] = formataddr((name, addrs))
> \ No newline at end of file
More information about the Mailman-Users
mailing list