Mark, i solved like this:
REPLACED THIS: #default action (moderate) #hold_for_approval(mlist, msg, msgdata, # MessageTooBig(bodylen, mlist.max_message_size)) FOR THIS: #auto rejecting emails bigger then max_message_size f_log=open('/var/log/mailman/reject','a') f_log.write('Message from %s to %s rejected. Size exceed: %s KB\n'% (sender, listname, bodylen/1024)) f_log.close() rej2="Our message was rejected because is bigger then list max value ( %s KB ), please reduce the message to bellow of %s KB and try again"% (bodylen/1024, mlist.max_message_size) raise Errors.RejectMessage, rej2 Thanks for your support and availability. Regards, --- Em 05/09/2016 12:57, Mark Sapiro escreveu: > On 09/05/2016 07:10 AM, Andre de Azevedo Cunha wrote: > >> Mark, >> >> the important to me is reject emails to the lists bigger then the value set >> in >> MAX_MESSAGE_SIZE in the list`s config. The default behavior is moderate this >> message, what don`t solve me problem. Exist one way to do this? > > I understand what you are trying to do and what you have done should > work. As I said in my prior reply > > Em 03/09/2016 13:00, Mark Sapiro escreveu: > > On 09/02/2016 01:45 PM, Andre de Azevedo Cunha wrote: > The message was rejected, but the sender dont receive any notify about > that. The mailman vette log too. How can i solve this? > > Logging for rejected messages was added in 2.1.16. See > <https://bugs.launchpad.net/mailman/+bug/1068837>. Prior to that, there > won't be a vette log entry. > > I don't know why there isn't a notice to the user. Is there anything in > Mailman's error log? > > As a test, add some nonmember address to the list's > reject_these_nonmembers and send a post from that address. Does that > receive a rejection notice? In order to help further, I need more information. Did you look in Mailman's error log? Did you do the test suggested above? Send me off list a copy of your modified Mailman/Handlers/Hold.py module and I'll look at it to see if there is a problem there. Also, if you want rejections to be logged in vette, you can apply the attached patch to Mailman/Queue/IncommingRunner.py. ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org https://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: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org