I want to restrict my users to sending a maximum of 25MB through Roundcube. I’ve accessed the Roundcube settings and set a custom limit in the file, but I’m still encountering difficulties.
In the file /var/lib/roundcube/.user.ini, I’ve added:
upload_max_filesize = 25M
post_max_size = 25M
So far, so good. Roundcube is displaying these settings to the user. However, I’m aware that I also need to adjust this limit in Exim. This is because of the base64 encoding that occurs before the message is sent, significantly increasing its size.
Therefore, I’ve set in the Exim configuration file, located at /etc/exim4/exim4.conf.template, the size to:
message_size_limit = 35M
I’m happy with this configuration, but the problem arises when the user exceeds the limit. The message displayed to them informs that they’ve exceeded the 35MB limit, not the 25MB one. I understand that this happens because Roundcube gets the message from Exim.
I’d like to know if anyone can help me customize this Exim return message so that when the user exceeds the limit, it shows 25MB in Roundcube instead of 35MB.