How to Increase Roundcube's Maximum Attachment Size Limit (Beyond 2MB)
- Last updated: Feb 22, 2024

As a recent user of Roundcube, I've started documenting the customizations I've made to better suit my needs. One of the first adjustments was increasing the maximum attachment size, which is limited to 2MB by default.
In this guide, I’ll show how to raise that limit to 10MB. Keep in mind that your SMTP server must also allow this size (not covered in this article).
- System Configuration:
- Debian: 12 (Bookworm)
- PHP: 8.2
- Roundcube: 1.6.5
Introduction
- By default, when composing a new email in Roundcube, the maximum attachment size is limited to 2MB, as shown in the image below:

Edit php.ini
- To increase the file upload limit, edit the
/etc/php/8.2/apache2/php.ini
file and update the following directives:
post_max_size = 10M
upload_max_filesize = 10M
- hen, restart the apache2 service to apply the changes:
root@host:~# systemctl restart apache2
- You should now see the updated value for the Maximum allowed file size when composing a message in Roundcube:
