Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to change the maximum attachment size for webmail on the Linux Plesk server?

 
backupdomainsfirewallhordelinux

Question

How to change the maximum attachment size for webmail on the Linux Plesk server?

Answer

RoundCube

The steps below will increase the maximum upload size to 1024M, feel free to adapt based on your needs:

  1. Connect to the server via SSH.
  2. Create a directory for custom templates:

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

  1. Copy original files to the created directory:

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

  1. Open /usr/local/psa/admin/conf/templates/custom/webmail/nginxWebmailPartial.php in a text editor (e.g., vi) and increase the value of client_max_body_size (e.g., 1024m), it should look like this:

# grep client_max_body_size /usr/local/psa/admin/conf/templates/custom/webmail/nginxWebmailPartial.php
client_max_body_size 1024m;

  1. Edit the appropriate webmail file to increase the value of FcgidMaxRequestLen:

# grep FcgidMaxRequestLen /usr/local/psa/admin/conf/templates/custom/webmail/roundcube.php
FcgidMaxRequestLen 1073741824

  1. Rebuild configuration files:

# /usr/local/psa/admin/bin/httpdmng --reconfigure-all

  1. Edit the appropriate PHP configuration file to increase the values of post_max_size and upload_max_filesize:

# cat /etc/psa-webmail/roundcube/php.ini
...
post_max_size = 1024M
upload_max_filesize = 1024M

  1. Open /etc/httpd/conf.d/fcgid.conf and increase the value of FcgidIOTimeout:

# grep FcgidIOTimeout /etc/httpd/conf.d/fcgid.conf
FcgidIOTimeout 300

 

 

 

 

Horde

  1. Connect to the server via SSH.

    Note: if direct SSH access to the server is not possible, contact server administrator for further assistance.

  2. Change the PHP settings as follows in /etc/psa-webmail/horde/horde/php.ini: 

    upload_max_filesize = 256M
    post_max_size = 256M 

  3. Modify also horde attach_size_limit value at /etc/psa-webmail/horde/imp/conf.php, it should be set to 0 (unlimited):

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

    Note: Set higher values if it is required.

  4. Modify templates and apply the change to all domains, perform the next steps. Create the custom templates directory for webmail:

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

  5. 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/

  6. Edit the FcgidMaxRequestLen directive in the custom template:

    # sed -i '/FcgidMaxRequestLen/cFcgidMaxRequestLen 268435456' /usr/local/psa/admin/conf/templates/custom/webmail/horde.php

  7. Apply changes within the template to all webmails using the next command:

    # plesk repair web -server

Note: In case there is server-wide ModSecurity limitation or timeouts caused by bandwidth, refer to the additional steps below:

In case the server uses ModSecurity

  1. Log in to Plesk.

  2. Navigate to Tools & settings > Web Application Firewall (ModSecurity) > Settings > Custom directives:

  3. Add the directive

    SecResponseBodyLimit 268435456

  4. Press Apply

Bandwidth limitations are causing a timeout

  1. Connect to the server via SSH.

  2. Backup the apache2 config file, increase…
Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Check Open Ports in Linux (Simple Commands & Tools)

Read More »

Linux Logs Explained

Read More »

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »
Knowledge Base

How to redirect webmail of all domains to a specific webmail URL in Plesk for Linux

Read More »

[BUG] nginx shows configuration error in Plesk: “proxy_read_timeout” directive is duplicate

Read More »

How to change PHP version for webmail in Plesk for Linux?

Read More »

Apache can not be started on a Plesk server: ModSecurity: Problems loading external resources

Read More »

Hosting Wiki

  • RESTful Web Service
  • Server Redundancy
  • Cloud Service Architecture
  • Virtualizor
  • Horde
  • On-Demand Services
  • Linux Containers
  • Bare Metal Server
  • Backup
  • Denial of Service
  • PhpMyAdmin
  • phpPgAdmin
  • Red Hat Virtualization
  • Virtuozzo
  • Oracle VM Server
  • Citrix Hypervisor
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Virtualization
  • PHP
  • Domain
  • VirtualMin
  • Plesk
  • Web Server
  • DNS Server
  • SSH
  • Firewall
  • Email Virus Protection
  • Webmail
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family