How to Limit Attachment Size on Horde in Plesk

December 12, 2022 / Plesk

The purpose of this article is to explain how to limit attachment size on the horde in Plesk. If you cannot send any attached documents via email, you need to modify your maximum attachment size. Plesk admins can modify and set a memory boundary to the attachment size for their Horde Webmail accounts.

To limit attachment size on Horde in Plesk, follow the steps:

  1. Join your Linux server via SSH.
  2. Revise the directory /etc/psa-webmail/horde/horde/php.ini and type the following command:
    upload_max_filesize = 256M
    post_max_size = 256M
  3. Then change the attach_size_limit value at the /etc/psa-webmail/horde/imp/conf.php Horde file. You can set it as unlimited if you don’t want to restrict the limit. The limit must be set to 0 and if you want to set any particular limit, you can enter that value.
    grep attach_size_limit /etc/psa-webmail/horde/imp/conf.php $conf[‘compose’][‘attach_size_limit’] = 0;
    And, these modifications must be imitated in all domains. For that, you have to modify the templates.
  4. To make custom webmail templates, you’ll need to make a new directory:
    # mkdir -p /usr/local/psa/admin/conf/templates/custom/webmail
  5. Type or copy the following template to the directory:
    # cp /usr/local/psa/admin/conf/templates/default/webmail/horde.php
  6. The FcgidMaxRequestLen directive in the custom template needs to be edited with the value specified in Bytes.
    # sed -i ‘/FcgidMaxRequestLen/c\FcgidMaxRequestLen 268435456’
    Lastly, apply these changes to all webmail templates.
  7. Execute the command:
    # plesk repair web –server

This way you can limit attachment size on Horde in Plesk. Hope you liked our article. If you face any issues, get in touch with our support team at any moment. They are available for you 24×7.

Spread the love