Guest User

Untitled

a guest
May 26th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import re
  2. from Mailman import Errors
  3.  
  4.  
  5. def process(mlist, msg, msgdata):
  6. if msgdata.get('approved'): # does this make sense?
  7. return
  8.  
  9. subject = msg.get("subject", "")
  10. if not re.search(r"^(Re:|AW:)", subject, re.I):
  11. return # not a reply
  12. if not (msg.get("in-reply-to") or msg.get("references")):
  13. raise Errors.RejectMessage("Your MUA sucks.")
Add Comment
Please, Sign In to add comment