You have problems with sending larger email attachments and hits the upload limit even though the attachment is smaller than the limit.
Emails are encrypted in Base64 before they are sent, which increases the size of the email. This increased size can trigger the ModSec upload limit rules and prevent the email from sending even though it appeared to be smaller than the limit when initially sent.
Here's some documentation on that:
Thus, the actual length of MIME-compliant Base64-encoded binary data is usually about 137% of the original data length, though for very short messages the overhead can be much higher due to the overhead of the headers. Very roughly, the final size of Base64-encoded binary data is equal to 1.37 times the original data size + 814 bytes (for headers).
Increasing the message_size_limit in the Exim Configuration Manager is an effective solution to this problem.
Steps to navigate to the message_size_limit field:
- Service Configuration ->
- Exim Configuration Manager ->
- Advanced Editor ->
- Section CONFIG ->
If message_size_limit is not listed, you can add it as a new configuration entry under the CONFIG section.