/
/
Changing the maximum attachment size in Roundcube

Changing the maximum attachment size in Roundcube

Why?

A larger attachment limit may be required when sending large files within the same email domain.

Instructions

To increase the attachment size limit in Roundcube, you will need to change the native PHP settings under "Settings" -> "PHP Settings". Select the native version of PHP (marked as "native") and click "Advanced Settings", then change the following settings:

  • max_execution_time
  • upload_max_filesize
  • post_max_size

 

When setting these values, keep in mind that "post_max_size" should be at least twice the value of "upload_max_filesize".

You should also check that the "memory_limit" is not less than the "upload_max_filesize".

Next, change the parameter "$config['max_message_size']" in the configuration file "/etc/roundcube/defaults.inc.php" – the size limit of attachments in Roundcube itself is 75% of this parameter.

Note that Exim's default email size limit is 50MB:

#exim -bP | grep message_size_limit
message_size_limit = 50M

Even if you increase this value on your mail server, there is no guarantee that the target recipient will be able to accept an email of this size due to standard Exim limitations.

So if you change this parameter, it is recommended to check whether other mail services can receive huge emails, as they may simply not be received, getting rejected by the recipients.

In this article