Increase message size limit to 25MB#629
Increase message size limit to 25MB#629JCBird1012 wants to merge 1 commit intodocker-mailserver:masterfrom JCBird1012:master
Conversation
|
Personally I don't see any reason to change the default value - Users can already do this by overriding the default value in the postfix-main.cf file? |
|
Correct.. Users can override the value themselves, however they need to know that they should do so. I wouldn't have figured out I needed to make this change unless I was obsessively checking the logs to figure out why some of my mail messages were getting dropped. Many users might not do that. Google has allowed Gmail users to send attachments of up to 25MB by default. We tout this image as working "out-of-the-box" with minimal configuration required... There's no reason to stick with the Postfix default as other email providers increase their attachment size limit beyond 10MB. As I said previously, there's really no downside in making this change except in the mailbox size limit issue I described. |
|
Hi @JCBird1012, and thanks for your first contribution. As stated above, this was already possible by configuring postfix. Another thing is that email should not be used for large file transfer, there are another and better protocols or services for that. For that reason I won't merge your PR for now. Sorry for that. |
Manual overriding doesn't take effect after you restart the docker with docker-compose .. I think it would be great to add an environment variable to the start-mailserver.sh so that I can easily change the default maximum message size value at the |
|
@jirislav could you create a PR for this? |
|
@jirislav just merged it! Thanks for the contribution! |
|
Glad I could help make something happen — even if it was implemented a little differently. |
|
@JCBird1012 the help is appreciated! |
This PR increases the limit Postfix enforces on message attachment size.
As of currently with
docker-mailserver, if someone were to send you a message, with an attachment greater than 10240000 bytes (roughly 10MB), Postfix would silently drop it, and return an error to the sender.Especially in this time of large files, attachments are creeping closer and closer to the default Postfix size limit. This will hopefully alleviate some headaches of dropped mail because of attachments that are too large.
However, where some users may potentially run into some issues regarding mailbox size. I believe the current default mailbox limit of Postfix is roughly 50MB... Two messages with full size attachments (at 25MB each) would fill up a user's mailbox.
That being said, things weren't much better at the default attachment size either (5 messages would fill up a user's mailbox).
Increasing the size limit of users' mailboxes may be beyond of the scope of this PR, but nonetheless something to consider. I can add that fix if you wish.