l.s.m.m.lpsize : module documentation

Part of lp.services.mailman.monkeypatches

A pipeline handler for checking message sizes.
Function truncated_message Create a smaller version of the message for moderation.
Function process Check the message size (approximately) against hard and soft limits.
def truncated_message(original_message, limit=10000):
Create a smaller version of the message for moderation.
def process(mlist, msg, msgdata):
Check the message size (approximately) against hard and soft limits.

If the message is below the soft limit, do nothing. This allows the message to be posted without moderation, assuming no other handler get triggered of course.

Messages between the soft and hard limits get moderated in the Launchpad web u/i, just as non-member posts would. Personal standing does not override the size checks.

Messages above the hard limit get logged and discarded. In production, we should never actually hit the hard limit. The Exim in front of lists.launchpad.net has its own hard limit of 50MB (which is the production standard Mailman hard limit value), so messages larger than this should never even show up.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.