Skip to content
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Solutions
    By Role
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    By Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    By Cloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    Partner Program
    Exclusive discounts, benefits and exposure to take your business to the next level
    Become a partner
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    Explore Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    Key Topics
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    Feature Packs
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    Featured Extension
    SocialBee
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • Extension
  • Pricing
  • Extensions
  • Help Center
  • More
    • Careers
    • Events
    • Plesk University
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • 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

Easy Steps to List All Open Linux Ports

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

Industry
Partners

industry-partner_ALIBABA
industry-partner_GOOGLEPARTNER
industry-partner_MICROSOFT
industry-partner_REDHAT-r2
industry-partner_ALIBABA
industry-partner_AUTOMATTIC
industry-partner_AWS
industry-partner_DIGITALOCEAN
industry-partner_SCALEWAY
Follow us:
Facebook Twitter Linkedin Youtube Github

COMPANY

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY

Blog
Forums 
Plesk University

First defaul

Company

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE​

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS​

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY​

Blog
Forums
Plesk University

Follow us:
Facebook Twitter Linkedin Youtube Github

© 2025 WebPros International GmbH. All rights reserved. Plesk and the Plesk logo are trademarks of WebPros International GmbH.

Managed with love with Plesk WP Toolkit