Code review comment for lp://staging/~jimpop/mailman/dmarc-reject

Revision history for this message
Mark Sapiro (msapiro) wrote :

I have merged this branch as a starting point. I am refactoring a few things including removing the Hold option and adding Munge From and Wrap Message options so the choices are "Accept, Wrap Message, Munge From, Reject and Discard" and the list owner is not allowed to set an option with a lower value than the site default.

I am also keeping the general Wrap Message and Munge From list options which will apply to messages From: domains without DMARC reject/quarantine and all messages if this setting is Accept.

I want to thank you again for this work Jim and also point out one problem I found.

The code in Moderate includes

    if sender:
        if Utils.IsDmarcProhibited(sender):

but sender may not be the From: address. I made this

    dn, addr = email.Utils.parseaddr(msg.get('from'))
    if addr:
        if Utils.IsDmarcProhibited(addr)

« Back to merge proposal