[Mailman-Users] DMARC hack
Allan Hansen
hansen at rc.org
Thu May 28 17:25:58 CEST 2015
Hi Stephen,
You’re right. AOL does not accept these messages with ‘invalid’ at the end.
You’re recommending this:
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, addrs))
Can I copy this code directly into the file?
Is <list-post address> valid syntax? (I have 40+ lists)
Yours,
Allan
> On May 24, 2015, at 6:10 , Stephen J. Turnbull <stephen at xemacs.org> wrote:
>
> 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