To enable the sending of attachments via email, adjust the maximum attachment size for your email accounts in Plesk. Plesk administrators can customize and establish a memory limit for attachment sizes in Horde Webmail accounts.
To set the limit for attachment size:
1. Establish a connection to your Linux server using SSH.
2. Edit the file /etc/psa-webmail/horde/horde/php.ini and input the following settings:
upload_max_filesize = 256M
post_max_size = 256M
3. Modify the attach_size_limit value in the /etc/psa-webmail/horde/imp/conf.php file of Horde. If you prefer an unlimited size, set the limit to "0":
grep attach_size_limit /etc/psa-webmail/horde/imp/conf.php $conf['compose']['attach_size_limit'] = 0;
Note: For specific requirements, set exact values for the attachment size.
Continuing, these adjustments need to be applied across all domains. This is why it's necessary to customize the templates.
4. Create a new directory for custom webmail templates:
# mkdir -p /usr/local/psa/admin/conf/templates/custom/webmail
5. Copy or enter this template into the directory:
# cp /usr/local/psa/admin/conf/templates/default/webmail/horde.php
/usr/local/psa/admin/conf/templates/custom/webmail/
6. 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/horde.php
To complete the process, apply these changes across the templates of all webmail accounts.
7. Execute the command:
# plesk repair web -server
This allows you to effortlessly establish a memory limit for the attachment size across all Horde Webmail accounts.