Need help?

Our experts have had an average response time of 11.7 minutes in August 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Change maximum attachment size for webmail on Linux Plesk server

by | Sep 24, 2021

Want to change the maximum attachment size for webmail on the Linux Plesk server? We can help you.

As part of our Server Management Services, we assist our customers with several Plesk queries.

Today, let us see how our techs change the attachment size.

 

Change maximum attachment size for webmail on Linux Plesk server

Here, our Support Techs discuss how to change the attachment size on RoundCube and Horde.

  • RoundCube

Initially, we connect to the server via SSH.

Then in /etc/psa-webmail/roundcube/php.ini, we change the PHP settings as follows:

upload_max_filesize = 256M
post_max_size = 256M

We need to modify the templates and apply the change to all domains.

After that, we create the custom templates directory for webmail:

mkdir -p /usr/local/psa/admin/conf/templates/custom/webmail

Then we copy the template to the custom templates folder:

cp /usr/local/psa/admin/conf/templates/default/webmail/roundcube.php /usr/local/psa/admin/conf/templates/custom/webmail/

Later, we edit the FcgidMaxRequestLen directive in the custom template:

sed -i ‘/FcgidMaxRequestLen/c\FcgidMaxRequestLen 268435456’ /usr/local/psa/admin/conf/templates/custom/webmail/roundcube.php

Finally, we apply the changes within the template to all webmails:

plesk repair web -server
  • Horde

Here, we first connect to the server via SSH.

Then we change the PHP settings as follows in /etc/psa-webmail/horde/horde/php.ini:

upload_max_filesize = 256M
post_max_size = 256M

In addition, we need to modify the horde attach_size_limit value at /etc/psa-webmail/horde/imp/conf.php. We set it to 0:

grep attach_size_limit /etc/psa-webmail/horde/imp/conf.php $conf[‘compose’][‘attach_size_limit’] = 0;

Then we modify templates and apply the change to all domains.

Once done, we create the custom templates directory for webmail:

mkdir -p /usr/local/psa/admin/conf/templates/custom/webmail

Then copy the template to the custom templates folder:

cp /usr/local/psa/admin/conf/templates/default/webmail/horde.php /usr/local/psa/admin/conf/templates/custom/webmail/

We also need to edit the FcgidMaxRequestLen directive in the custom template:

sed -i ‘/FcgidMaxRequestLen/c\FcgidMaxRequestLen 268435456’ /usr/local/psa/admin/conf/templates/custom/webmail/horde.php

Finally, to apply changes within the template to all webmails, we run:

plesk repair web -server

However, if there is server-wide ModSecurity limitation or timeouts due to bandwidth, our Support Techs recommend the steps below:

  • If the server uses ModSecurity

  1. First, we log in to Plesk.
  2. Then we navigate to Tools & settings > Web Application Firewall (ModSecurity) > Settings > Custom directives
  3. Here, we add the directive:
    SecResponseBodyLimit 268435456
  4. Then we press Apply
  • If Bandwidth limitations cause a timeout

in this case, we connect to the server via SSH.

Then we backup the apache2 config file, increase the timeout delay up to 2 minutes and restart the apache2 server:

a) For Rhel-based OS:

cp /etc/httpd/conf.d/fcgid.conf{,.bkp}
sed -i ‘/FcgidIOTimeout/c\ FcgidIOTimeout 120’ /etc/httpd/conf.d/fcgid.conf
systemctl restart httpd2

b) For Debian-based OS:

cp /etc/apache2/mods-enabled/fcgid.conf{,.bkp}
sed -i ‘/FcgidIOTimeout/c\ FcgidIOTimeout 120’ /etc/apache2/mods-enabled/fcgid.conf
systemctl restart apache2

[Stuck in between? We’d be happy to assist you]

 

Conclusion

In short, we saw how our Support Techs fix the attachment issue for webmail.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF