
I have a critical situation that I need addressed, and it deals with large messages being sent to mailman mailing lists.
Currently, we have a lot of large mailing lists (some have 10,000 to 15,000 subscribers) and some of these lists is all Faculty/Staff email subscribers that have an account on our mail server. All messages sent to these lists are moderated. Here's the problem, when some of these pending messages are accepted to be sent, and one of the messages happens to be 5mb in size, that amount of email that is sent to our mail server all at once, "kills us", and someday if a larger one is sent, it will fill up our mail stores and corrupt our mail server.
We can configure our mail server to not accept a message over 5 meg and that would solve the problem, but our University Advisory Committee would not allow that. They have approved that it be set to 10 meg, for messages be sent to only one recipient, but individuals who use the mailing lists, abuse this. Sometimes messages get approved that shouldn't and we run into this problem
All get to my point, is there a way that if a moderator tries to approve a message that is over 1 meg, that maybe some custom python code could be developed to pop up a message and say "Only messages below 1 meg can be approved" and have the message discarded, or tell the user the only option they have is to discard the message.
I know there's the "max_message_size" option you can set, but that still sends the message to the pending database and they can still accept the message, rather than discard the message when its above that size.
Any Solution? I know you will want to say change your policy on your mail server, but at this point it's not a option.
-- Kory Wheatley Academic Computing Analyst Sr. Phone 282-3874 ######################################### Everything must point to him.

On May 6, 2004, at 03:34, Kory Wheatley wrote:
All get to my point, is there a way that if a moderator tries to approve a message that is over 1 meg, that maybe some custom python code could be developed to pop up a message and say "Only messages below 1 meg can be approved" and have the message discarded, or tell the user the only option they have is to discard the message.
If the administrator isn't allowed to do anything but discard the message, wouldn't it be better to just discard (or reject with notice to the sender) at the time that the message is received rather than holding it for discard/reject? There are a couple of ways you could do that. 1. The quick one is modify Mailman/Handlers/Hold.py so that instead of doing hold_for_approval() you raised Errors.RejectMessage (or Errors.DiscardMessage) if the message is too big. --- Hold.py-2.1.4 2003-12-27 07:55:45.000000000 +0900 +++ Hold.py 2004-05-07 16:35:05.000000000 +0900 @@ -177,8 +177,12 @@ for line in email.Iterators.body_line_iterator(msg): bodylen += len(line) if bodylen/1024.0 > mlist.max_message_size: - hold_for_approval(mlist, msg, msgdata, - MessageTooBig(bodylen, mlist.max_message_size)) + raise Errors.RejectMessage, Utils.wrap('''Your message +exceeds the maximum size allowed for mailing list messages and has +not been distributed. + +For more information on mailing list policy, visit +http://institution.edu/mail/rules.html or contact admin@institution.edu''') # no return The disadvantage is that you have to remember to make this change each time you upgrade Mailman. 2. A cleaner way is to add a custom site handler early in the message pipeline that checks the message size (steal the code from Hold.py :-) and raises the appropriate error. Add it to your GLOBAL_PIPELINE in your mm_cfg.py. Good for other site-specific hacks. But I suppose you could modify Mailman/Cgi/admindb.py to do what you ask. Don't create the button for "Accept" (or allow the accept response so nobody gets tricky) for large messages. You would want to unroll the loop so that the "Reject"/"Discard" buttons are available for each message rather than for each sender. -- Jim Tittsler http://www.OnJapan.net/ GPG: 0x01159DB6 Python Starship http://Starship.Python.net/ Ringo MUG Tokyo http://www.ringo.net/rss.html
participants (2)
-
Jim Tittsler
-
Kory Wheatley