~mailman-coders/mailman/2.1

« back to all changes in this revision

Viewing changes to Mailman/Handlers/Moderate.py

  • Committer: Mark Sapiro
  • Date: 2014-05-02 18:42:09 UTC
  • Revision ID: mark@msapiro.net-20140502184209-p4x23x0vtd26qbf7
More fine tuning of dmarc_moderation_action.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
def process(mlist, msg, msgdata):
51
51
    if msgdata.get('approved'):
52
52
        return
53
 
    # Before anything else, check DMARC.
 
53
    # Before anything else, check DMARC if necessary.
54
54
    msgdata['from_is_list'] = 0
55
55
    dn, addr = parseaddr(msg.get('from'))
56
 
    if addr:
 
56
    if addr and mlist.dmarc_moderation_action > 0:
57
57
        if Utils.IsDMARCProhibited(addr):
58
58
            # Note that for dmarc_moderation_action, 0 = Accept, 
59
59
            #    1 = Munge, 2 = Wrap, 3 = Reject, 4 = Discard