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 <step...@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
> 

------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to