John wrote: >Has anyone implemented an automatic non-member approval based on a header >value?
A couple of remarks. You can't do this with header_filter_rules because the accept action merely passes this check; it doesn't unconditionally accept the message. This is not hard to do with a custom handler. See <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.067.htp> for information on installing such a handler. A skeleton of the handler itself is simply def process(mlist, msg, msgdata): # Get the contents of the header (X-My-Header:) contents = msg['x-my-header'] if not contents: # header not present or was empty - to distinguish these # test contents == None for header not present return # some test on contents here. To accept message set # msgdata['approved'] = 1 return This handler would need to be in the pipeline preceding Moderate. The one caveat is it will also bypass all the holds in the Hold handler. If this is an issue, you could set some new flag in msgdata and modify Moderate to skip the membership test based on that flag. -- Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list [email protected] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
