Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Set the Attachment Size Limit for Roundcube in Plesk

This guide shows how to change the biggest file you can attach in Roundcube webmail on a Plesk server. It needs root access, so it is for VPS and dedicated server owners.

Email2 min read9 steps

What is Roundcube?

Roundcube is a webmail program. Webmail lets you read and send email in a web browser. Roundcube checks the size of each attachment. The size limit comes from the PHP settings of the server. PHP is the language Roundcube is written in.

Two PHP settings matter. They are upload_max_filesize and post_max_size. The first is the largest single file. The second is the largest total upload. Keep post_max_size equal to or bigger than the first one.

Warning: Wrong settings can stop PHP from loading. Take a backup of the file before you edit it.

Steps

  1. Log in to the server as root with SSH. SSH is a safe way to type commands on a remote server.
  2. Back up the Roundcube settings file. The usual path on Plesk is shown below.
cp /usr/share/psa-roundcube/config/config.inc.php /root/config.inc.php.bak

This command makes a safe copy of the file in the root folder.

  1. Find the PHP settings used by Plesk webmail. Many servers use a file such as /etc/php.ini or a file inside /etc/php.d/. If you are not sure, run the command below.
php -i | grep "Loaded Configuration File"

This command prints which php.ini file is in use.

  1. Open that file in a text editor such as nano.
  2. Find the line upload_max_filesize and set a new value, for example upload_max_filesize = 25M. The M means megabytes.
  3. Find post_max_size and set it to the same value or a little higher, for example post_max_size = 30M.
  4. Save the file and close the editor.
  5. Restart the web service so the change is used. On many Plesk servers this command works.
systemctl restart plesk-php*-fpm

This restarts the PHP service. Service names differ by PHP version, so ask Hostvento support if the name is not found.

  1. Open Roundcube, write a new email and try a file that is near the new limit.
Tip: Mail servers on the other side also have limits. A very large attachment may be rejected there, even if Roundcube accepts it.

Quick recap

  • Roundcube uses the PHP limits upload_max_filesize and post_max_size.
  • You need root access to change them.
  • Back up the file first, edit it, then restart PHP.
  • Test with a real attachment.