Christopher Adams wrote:

>Is there a way to for a system override of the ability of list owners
>to approve messages that are larger than what they have set in
>max_message_size?


This would require changing the code in Mailman/Handlers/Hold.py. If
you want to do that, you'd find the code section

        if bodylen/1024.0 > mlist.max_message_size:
            hold_for_approval(mlist, msg, msgdata,
                              MessageTooBig(bodylen,
mlist.max_message_size))
            # no return


and if you want to just discard the messages, change it to

        if bodylen/1024.0 > mlist.max_message_size:
            raise Errors.DiscardMessage
            # no return

and if you want to reject the message, change it to something like

        if bodylen/1024.0 > mlist.max_message_size:
            raise Errors.RejectMessage, Utils.wrap(
                MessageTooBig(bodylen,
                    mlist.max_message_size).reason_notice())
            # no return

Note that the

                MessageTooBig(bodylen,
                    mlist.max_message_size).reason_notice())

above just creates the standard

Message body is too big: <bodylen> bytes with a limit of
<max_message_size> KB

message, but you could provide any message you want.

-- 
Mark Sapiro <[EMAIL PROTECTED]>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to