On 7/3/2013 9:44 PM, Mark Sapiro wrote:
On 07/03/2013 07:40 AM, Chris Nulk wrote:
Okay.  Makes sense.  Here is the modified do_discard_globalban code:

def do_discard_globalban(mlist, msg, sender):
     # forward discarded message to site administrator(s) if defined
     #    in mm_cfg.GLOBALBANLIST_NOTIFY
     notifylist = []
     if mm_cfg.GLOBALBANLIST_NOTIFY:
         notifylist.append(mm_cfg.GLOBALBANLIST_NOTIFY)

You might consider making mm_cfg.GLOBALBANLIST_NOTIFY a list of 1 or
more addresses in which case the above would be

     if mm_cfg.GLOBALBANLIST_NOTIFY:
         notifylist.extend(mm_cfg.GLOBALBANLIST_NOTIFY)

or you could get fancy and test if it's a list or a string and extend or
append accordingly.


Sorry about not responding earlier, I was on vacation. That is exactly what I intended. I didn't see extend when I was looking up information on lists. Thanks.

I was thinking about what you mentioned in an earlier message about this handler not catching the command requests like subscribe, unsubscribe, etc. I think I have a possible solution but I want to think about it some more then ask about it.

Thanks for the help on the handler,
Chris
------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
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

Reply via email to