Cantech Knowledge Base

Your Go-To Hosting Resource

How to Set Limit to Attachment Size for Roundcube on Plesk Server?

If you’re operating a mail server via Plesk and using Roundcube as your webmail frontend, you’ve likely run into the issue of attachment size limits. Users may complain they are unable to send files a few megabytes without receiving errors, and messages fail to send for no reason.

Why? Because there are a multitude of settings that govern attachment size limits. A combination of PHP, mail server, and Roundcube settings determine these limits. In this guide, we will help you with each step necessary to set a proper limit for utilizing attachments in Roundcube on a Plesk managed server.

If you are an experienced system admin, someone who runs a web hosting provider that serves clients’ email, or someone who utilizes Roundcube for email, you can easily start sending files to users at ease!

What Will You Need?

Before we start, you will require the following:

  • Admin access to your Plesk control panel.
  • Root or SSH access to your server.
  • A basic understanding of using a Linux terminal and editing all configuration files.
  • A backup of your configuration files before making changes.

Why is File Attachment Size Essential?

Roundcube is only one piece of the email-sending chain. When an attachment is being uploaded:

PHP requires to accept the file upload.
Roundcube has to allow that attachment size in its configuration.
The mail server has to allow the total size of the message, including attachments, headers, and encoding.
If any one of these layers restricts size, the user will have a problem.

Step-by-Step Instructions to Increase Attachment Size In Roundcube

Step:1 Test Current Attachment Limit

Login to Roundcube through Plesk Webmail.

Try to send an email with a big attachment i.e. 15 MB.

If it fails, look for error messages in /var/log/plesk/roundcube/errors or /var/log/maillog.

Step:2 Increase PHP Upload Limits for Webmail

Roundcube operates under Plesk using a separate php handler. Therefore, you need to modify PHP limits specific to webmail.

To increase the PHP upload limits for Webmail, you require to follow the few simple steps:

  • Log into the Plesk Panel.
  • Then, navigate to Tools & Settings > PHP Settings > PHP Handler for Webmail
  • Change the following values:
    upload_max_filesize = 25M
    post_max_size = 30M
    memory_limit = 128M
  • Select Apply or Ok to confirm the modifications.

Step:3 Modify the Roundcube Configuration File.

Roundcube manages its own maximum message size.

Procedure to modify the roundcube configuration file is as follows:

  • SSH into your server or use the Plesk File Manager.
  • Open the Roundcube config file:
nano /usr/share/psa-roundcube/config/config.inc.php
  • Add or modify this line:
$config['max_message_size'] = 25000000; // 25 MB in bytes
  • Then, save and exit.

Step:4 Edit Mail Server (Postfix) Message Size limit

While PHP and Roundcube may allow large files, your mail server (i.e. Postfix) may still reject it.

To set message size limit, carry out the following steps:

  • Open the Postfix configuration file.
nano /etc/postfix/main.cf
  • Add or edit.
message_size_limit = 26214400  # 25 MB in bytes
  • Save and terminate the file, then restart Postfix.
systemctl restart postfix

Step:5 Restart Web Services

Now that we have made our changes, restart the appropriate services to enforce the new limits.

systemctl restart apache2
systemctl restart nginx

Alternatively, you can restart from within Plesk > Tools & Settings > Services Management.

Step: 6 Check Everything Works

  • Log into Roundcube.
  • Compose a new email and attach a file about 20 to 25MB.
  • Send it to a valid address.
  • Then, check to see if it was delivered successfully or if it encountered errors in:
/var/log/maillog
           
/var/log/plesk/roundcube/errors

If everything worked correctly, you should now be able to send large attachments without issue!

Conclusion

Increasing the Roundcube attachment size on a Plesk server is not quite as simple as a one-click setting. You need to adjust your PHP limits, Roundcube’s internal configurations, and your mail server settings. Now, you have the complete roadmap to make these changes, and enhance your email systems easily.

Frequently Asked Questions

What is the safe maximum limit I can use for attachments?
The safe limits to use attachments are usually 20 to 25MB. Anything greater than 25MB begins to experience issues when the recipients’ mail servers will reject the message.

Can I set different attachment limits for different email users in Roundcube?
Not in Roundcube itself. There are no per-user limits in Roundcube. In order to set limits, you will have to customize or by using a third-party mail management tool.

Can users still fail to send attachments after modifying those settings?
Yes, based on the lower message size limits of the recipient’s mail server, the mail server could reject the message. Always look at bounce-back messages for hints.

Is there a log file that shows where attachment uploads are failing?
Yes, you can check these files:

For Roundcube related issues,

/var/log/plesk/roundcube/errors

and

For mail transfer issues,

/var/log/maillog or /var/log/mail.log
June 4, 2025