How to Change the Roundcube Attachment Size Limit on the Plesk Server

February 9, 2023 / Plesk

If you cannot send any attached files by email, you will need to change the attachment’s maximum size. The memory limit for the attachment size for Webmail accounts in Roundcube can be changed by Plesk admins. This is what you will find in this article.

Let us find out how to do it:

  1. Join your Linux server through SSH.
  2. Revise the directory /etc/psa-webmail/roundcube/php.ini and enter the below settings:
    upload_max_filesize = 100M
    post_max_size = 100M
  3. Open the /usr/share/psa-roundcube/config/ file. The value you provide here needs to be 33% higher than the limit value.
    $config[‘max_message_size’] = ‘133M’;

As these modifications must reflect on all domains, you need to modify the templates.

  1. To create a new directory for the custom templates for webmail, enter the command given below:
    # mkdir -p /usr/local/psa/admin/conf/templates/custom/webmail
  2. Put this template in the directory by copying it:
    # cp /usr/local/psa/admin/conf/templates/default/webmail/roundcube.php
  3. Modify the FcgidMaxRequestLendirective in the custom template using the value stated in Bytes.
    # sed -i ‘/FcgidMaxRequestLen/c\FcgidMaxRequestLen 268435456’
  4. Apply these modifications to the template of each webmail account to complete the process. Execute the following command:
    # plesk repair web –server

That’s it! Hope you found it to be easy and understandable. For any query, do contact our support staff at your earliest.

Spread the love