Hi there,
first, many thanks for your great project - it's awesome :)
Sometimes we need to send emails with very large attachments (about 50MB) over postal.
They fail at the moment with the message: 552 Message too large (maximum size 14MB)
It seems, that postal has a hardcoded limit of 14MB, is that correct?

It would be awesome, if this limit can be configured over the interface or the config file (postal.yml).
What do you think?
Many thanks and best regards
Reto
That's correct. At present, that is limited by the size of the data column on the database that stores raw messages. To allow this to be configurable, the raw message table will need to be able to overflow data into new rows. This is something we'd like to add one day so I'll mark this as an enhancement.
Hi @adamcooke
Is there a way to workaround the issue (for example not to store the message in the DB)?
Thanks!
Or possibly switch to LONGBLOB as column type which supports up to 4GB (https://stackoverflow.com/a/5775601/1580028).
Which probably has a whole host of implications on itself, but could be made in a configurable setting maybe...
I really don't see any reason why we can't just change the column type in the table creation code and change the limit.
Mind sharing where that "table creation code" is located at ?
Thanks !
https://github.com/atech/postal/blob/master/lib/postal/message_db/provisioner.rb#L85
Changing mediumblob to longblob will allow messages up to 4GB to be stored in all newly created data tables (ie starting the next day).
The validation here will then need to be made configurable:
https://github.com/atech/postal/blob/master/lib/postal/smtp_server/client.rb#L380
This is actually a really trivial change. Feel free to try it and submit a pull request.
Most helpful comment
I really don't see any reason why we can't just change the column type in the table creation code and change the limit.