rss logo

Increase the maximum size of attachments in Roundcube

Rouncube Logo

As I explained in a previous article, I'm a new user of Roundcube, so I'm going to create some articles about the changes I've made to adapt it to my use and needs. One of the changes I needed was to increase the maximum attachment size, which is set to 2MB by default.

In this example, I'd extend it to 10MB, but you'll need to remember to set the same limit on your SMTP server (not detailed here).

  • Configuration:
    • debian: 12 bookworm
    • php: 8.2
    • roundcube: 1.6.5


  • By default, when composing a new mail we are limited to 2MB as we can see on this image:
Rouncube default attachements size

Edit php.ini

  • To increase the size limit, we need to edit the file /etc/php/8.2/apache2/php.ini and modify the following lines:
post_max_size = 10M upload_max_filesize = 10M
  • Then restart the apache2 service:
root@host:~# systemctl restart apache2
  • Now you should see modified value for the Maximum allowed file size:
Rouncube attachements size value set to 10MB