non-member approval based on header.
Has anyone implemented an automatic non-member approval based on a header value?
thanks, John
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 <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
John
-
Mark Sapiro