Hi Mark,
I got it to compile properly, but it is still not working.
I made the following changes in Foo.py:
import re
cre = re.compile('test.account', re.IGNORECASE)
def process(mlist, msg, msgdata):
if mlist.internal_name <> 'abc-l':
return
if cre.search(msg.get('to', '')):
msgdata['approved'] = 1
# Used by the Emergency module
msgdata['adminapproved'] = 1
Goal: The account [email protected] is set to forward mail to the
mailing
list [email protected], which should accept it, regardless of who sent it
to
[email protected] (all other mail to this list from non-members will
be
rejected).
You also wrote:
>if the contents of the To: header of the message matches the regexp in
>re.compile() case insensitively, then the approved and adminapproved
>flags will be set in the message metadata and the message won't be
>subject to any holds.
So when you say "matches the regexp" do you mean "exactly" matches? And
if so,
would your regexp work? Or do I need a more specific or accompanying
regexp in
the re.compile statement? eg
cre = re.compile('[email protected]', re.IGNORECASE)
Thanks.
- jim -
------------------------------------------------------
Mailman-Users mailing list [email protected]
http://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:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org