Thanks for pointing out the fact that a pipe means or. I'm still quite new to regex but I'm learning quickly.

I've reviewed the page you reference on custom handlers.

I've looked into the custom handler file and notice 'discard_pattern' after comment suggesting regex here >>

39 <https://wiki.list.org/DOC/4.67%20How%20do%20I%20implement%20a%20custom%20handler%20in%20Mailman%2C%20e.g.%20to%20mung%20headers%20or%20filter%20posts%20based%20on%20regex%20searches%20of%20the?action=AttachFile&do=view&target=MyHandler.py#CA-55dfa850a8a4b4119d680aeeb8a9f594c3426e78_39> # the message if more than one matches, the precedence is DISCARD over 40 <https://wiki.list.org/DOC/4.67%20How%20do%20I%20implement%20a%20custom%20handler%20in%20Mailman%2C%20e.g.%20to%20mung%20headers%20or%20filter%20posts%20based%20on%20regex%20searches%20of%20the?action=AttachFile&do=view&target=MyHandler.py#CA-55dfa850a8a4b4119d680aeeb8a9f594c3426e78_40> # REJECT over HOLD. 41 <https://wiki.list.org/DOC/4.67%20How%20do%20I%20implement%20a%20custom%20handler%20in%20Mailman%2C%20e.g.%20to%20mung%20headers%20or%20filter%20posts%20based%20on%20regex%20searches%20of%20the?action=AttachFile&do=view&target=MyHandler.py#CA-55dfa850a8a4b4119d680aeeb8a9f594c3426e78_41> DISCARD = re.compile(r'discard_pattern', re.IGNORECASE) 42 <https://wiki.list.org/DOC/4.67%20How%20do%20I%20implement%20a%20custom%20handler%20in%20Mailman%2C%20e.g.%20to%20mung%20headers%20or%20filter%20posts%20based%20on%20regex%20searches%20of%20the?action=AttachFile&do=view&target=MyHandler.py#CA-55dfa850a8a4b4119d680aeeb8a9f594c3426e78_42> REJECT = re.compile(r'reject_pattern', re.IGNORECASE) 43 <https://wiki.list.org/DOC/4.67%20How%20do%20I%20implement%20a%20custom%20handler%20in%20Mailman%2C%20e.g.%20to%20mung%20headers%20or%20filter%20posts%20based%20on%20regex%20searches%20of%20the?action=AttachFile&do=view&target=MyHandler.py#CA-55dfa850a8a4b4119d680aeeb8a9f594c3426e78_43> HOLD = re.compile(r'hold_pattern', re.IGNORECASE) 44 <https://wiki.list.org/DOC/4.67%20How%20do%20I%20implement%20a%20custom%20handler%20in%20Mailman%2C%20e.g.%20to%20mung%20headers%20or%20filter%20posts%20based%20on%20regex%20searches%20of%20the?action=AttachFile&do=view&target=MyHandler.py#CA-55dfa850a8a4b4119d680aeeb8a9f594c3426e78_44> # And if the following regexp matches the Subject: header, the message will 45 <https://wiki.list.org/DOC/4.67%20How%20do%20I%20implement%20a%20custom%20handler%20in%20Mailman%2C%20e.g.%20to%20mung%20headers%20or%20filter%20posts%20based%20on%20regex%20searches%20of%20the?action=AttachFile&do=view&target=MyHandler.py#CA-55dfa850a8a4b4119d680aeeb8a9f594c3426e78_45> # be unconditionally accepted. 46 <https://wiki.list.org/DOC/4.67%20How%20do%20I%20implement%20a%20custom%20handler%20in%20Mailman%2C%20e.g.%20to%20mung%20headers%20or%20filter%20posts%20based%20on%20regex%20searches%20of%20the?action=AttachFile&do=view&target=MyHandler.py#CA-55dfa850a8a4b4119d680aeeb8a9f594c3426e78_46> ACCEPT = re.compile(r'accept_pattern', re.IGNORECASE) 1. Am I right in assuming that I can replace the text discard_pattern' with python formatted regex? 2. Can I have multiple Discard, Hold, Reject or Accept lines?

Barco
------------------------------------------------------
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