[Mailman-Users] Simple notification handler
Yves Moisan
yves.moisan at boreal-is.com
Wed Dec 21 17:43:38 CET 2011
Thank you Mark. I'll give it a try.
Yves
>
>
> You need something like
>
> import re
> from Mailman import Utils
> from Mailman.Message import UserNotification
> NTEXT = """The text of
> the
> notification.
> """
> NRECIP = 'recipient at example.com'
> NFROM = 'sender at example.com'
> NSUBJ = 'Notification subject'
>
> def process(mlist, msg, msgdata):
> subject = Utils.oneline(msg['subject'], 'us-ascii')
> if re.search('.*rror.*', subject, re.IGNORECASE)
> nmsg = UserNotification(NRECIP, NFROM, NSUBJ, NTEXT)
> nmsg.send(mlist)
>
>
More information about the Mailman-Users
mailing list