Cloud Service >> Knowledgebase >> Plesk >> How to Set Limit to Attachment Size for Roundcube on Plesk Server?
submit query

Cut Hosting Costs! Submit Query Today!

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

To limit Roundcube's attachment size on a Plesk server, you typically need to adjust the settings in both Roundcube and the mail server (usually Postfix or whatever mail server software you're using).

Here's a general guide:

Roundcube Configuration:

- Access your Plesk server file system via SSH or FTP.

- Navigate to the Roundcube configuration directory. It's often located at /etc/roundcube.

- Look for the config.inc.php file. Then open it in a text editor.

- Search for the line that starts with $config['max_message_size']. If it does not exist, add it. This line controls the maximum size of an email message, including attachments–that Roundcube will allow.

- Set the desired maximum message size in bytes. For instance, to limit attachments to 10MB, you would set it to $config['max_message_size'] = 10485760; (10 * 1024 * 1024).

- At last, save the changes.

Mail Server Configuration (e.g., Postfix):

 

- Access your Plesk server via SSH

- Locate the Postfix configuration file. It can be found at /etc/postfix/main.cf.

Search for or add the following parameter:

makefile

message_size_limit = 10485760

Set the value to your desired maximum message size in bytes. This example sets it to 10MB.

- Save the changes and close the file.

Restart Services:

After making these changes, it's essential to restart both Roundcube and the mail server to apply the new settings. You can typically do this with commands like:

swift

systemctl restart roundcube

systemctl restart postfix

Note: The commands may vary depending on your server's operating system and setup. Adjust accordingly.

After following these steps, Roundcube should enforce the specified limit on attachment sizes. Make sure to test the changes thoroughly. This will ensure they are working as expected. For more information, you can reach our hosting team.

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!