Adjusting the maximum attachment size is crucial if you encounter difficulties sending documents via email. Plesk administrators can define a memory limit for Roundcube Webmail attachment sizes.
Setting Attachment Size Limit
-
Connect to your Linux server using SSH.
-
Modify the file /etc/psa-webmail/roundcube/php.ini with the following settings:
upload_max_filesize = 100M
post_max_size = 100M
-
Open the file /usr/share/psa-roundcube/config/config.inc.php.
$config['max_message_size'] = '133M';
Note: The value mentioned here should be 33% higher than the limit you set.
Continuing, these adjustments must be applied across all domains, necessitating template modifications.
-
Create a new directory for custom webmail templates:
# mkdir -p /usr/local/psa/admin/conf/templates/custom/webmail
-
Copy or input this template into the directory:
# cp /usr/local/psa/admin/conf/templates/default/webmail/roundcube.php
/usr/local/psa/admin/conf/templates/custom/webmail/
-
Modify the FcgidMaxRequestLen directive in the custom template with the specified value in Bytes. (For example: 256MB = 268435456 Bytes)
# sed -i '/FcgidMaxRequestLen/c\FcgidMaxRequestLen 268435456'
/usr/local/psa/admin/conf/templates/custom/webmail/roundcube.php
To complete the process, apply these changes across the templates of all webmail accounts.
-
Execute the command:
# plesk repair web -server
This ensures a seamless implementation of the specified changes within the templates for all webmail accounts.