The change works, the message was discarted, but the sender dont received the notify. I`m trying to understand why.
Att, --- Em 14/04/2022 15:21, Mark Sapiro escreveu: > On 4/14/22 10:29, Andre de Azevedo Cunha wrote: > >> Hi! >> >> I'm testing the migration of my mailman2 lists to mailman3. >> Had made the adjustment below to discard messages larger than the list >> size limit. But I'm having difficulties to implement the same solution >> in mailman3. How could I do this? > > something like > ``` > diff --git a/src/mailman/chains/builtin.py b/src/mailman/chains/builtin.py > index ecb56d67f..ba3a3b4bc 100644 > --- a/src/mailman/chains/builtin.py > +++ b/src/mailman/chains/builtin.py > @@ -59,7 +59,7 @@ class BuiltInChain: > ('administrivia', LinkAction.defer, None), > ('implicit-dest', LinkAction.defer, None), > ('max-recipients', LinkAction.defer, None), > - ('max-size', LinkAction.defer, None), > + ('max-size', LinkAction.jump, 'reject'), > ('news-moderation', LinkAction.defer, None), > ('no-subject', LinkAction.defer, None), > ('digests', LinkAction.defer, None), > diff --git a/src/mailman/rules/max_size.py b/src/mailman/rules/max_size.py > index 50de9ff5d..53cb3ae50 100644 > --- a/src/mailman/rules/max_size.py > +++ b/src/mailman/rules/max_size.py > @@ -65,7 +65,9 @@ class MaximumSize: > with _.defer_translation(): > # This will be translated at the point of use. > msgdata.setdefault('moderation_reasons', []).append( > - (_('The message is larger than the {} KB maximum size'), > - mlist.max_message_size)) > + (_('Your message was rejected because is bigger than the > ' > + 'list max value ({} Kb), please reduce the message to > ' > + 'below {} KB and try again.').format( > + test_size, mlist.max_message_size))) > return True > return False > ``` ------------------------------------------------------ Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send an email to mailman-users-le...@python.org https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/