Shashikanth Komandoor writes:
But the /var/log/maillog says the below error during the above
hand shake.
*status=bounced (host 0.0.0.0[0.0.0.0] said: 552 Error: Too much mail data*
I have browsed google for understanding and fixing the issue.
During which I encountered the information given by Mr. Mark Sapio at https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/G.... But I could not fix the issue as it is mentioned the default size limit is 33554432.
There's no way to configure the LMTP server's message_size_limit in Mailman; this is a bug but I can't say when it will be fixed.
In mailman/src/mailman/runners/lmtp.py, class LMTPController, if you edit the line
server = LMTP(self.handler)
to
server = LMTP(self.handler, data_size_limit=100_000_000)
it should have the desired effect. (I think that if as suggested by your post you're using Python 3.6, you'll have to remove the underscores from "100_000_000"; that feature was added in 3.7.)
Unfortunately, any time you upgrade Mailman you'll have to edit it again (that's why I say this is a bug).
I do not understand why the approach you used of editing DATA_SIZE_DEFAULT in aiosmtpd/smtp.py didn't work. The only thing I can imagine is that you have multiple Python installations and the one you edited is not the one that Mailman is currently using, or the same issue for multiple Mailman installations each with their own venvs or whatever.
You also will have to configure Mailman. If you haven't done so already, the procedure is
- Sign into Postorius as owner of the list,
- click on the tab "Settings" in the middle of the header under the name of the list,
- click on "Message Acceptance" in the sidebar at the left, and
- set "Maximum message size" to 100000 (kb; no commas or periods).
Unlike the LMTP size setting above, this configuration will persist across Mailman upgrades.
Also, please also let me know if there is any limitation specific for the attachments so that I can customize that too respectively.
No.
Steve