# Better attachment handling?

**URL:** <https://discourse.mailinabox.email/t/better-attachment-handling/8463>\
**Category:** Improvements\
**Created:** [October 15, 2021, 12:32am UTC](https://discourse.mailinabox.email/t/better-attachment-handling/8463 "2021-10-15T00:32:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![edhaas](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/edhaas/32/1381_2.png) [@edhaas](https://discourse.mailinabox.email/u/edhaas)\
**Post date:** [October 15, 2021, 12:32am UTC](https://discourse.mailinabox.email/t/better-attachment-handling/8463/1 "2021-10-15T00:32:52Z")

</div>

Hello all,  
Some of my users are in the habit of sending large attachments back and forth between themselves as part of their work flow. This creates two or more copies of each attachment in the server, which is eating up storage space rapidly. I have opened up the Nextcloud interface and would like to encourage users to upload their attachments to their file storage and send links instead of actual files. Anyone know a way to encourage this in Roundcube? In Thunderbird there are plugins that do this, but some of my users prefer the default Roundcube. Also, is there an easy way to reduce the allowed attachment size to force users to create links?  
Thanks!

---

<div class="post-metadata">

**Author:** ![openletter](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@openletter](https://discourse.mailinabox.email/u/openletter)\
**Post date:** [October 15, 2021, 12:44am UTC](https://discourse.mailinabox.email/t/better-attachment-handling/8463/2 "2021-10-15T00:44:24Z")

</div>

I’m not aware of ways within MiaB, though someone else might be.

However, you are starting to brush up against the edge of the intended use-case of MiaB. Likely the better solution is for `dovecot` to use `dbox` file format (most choose `sdbox`), which has an option to maintain one copy of an attachment file across the server, IIRC.

---

<div class="post-metadata">

**Author:** ![openletter](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/o/f1d935/32.png) [@openletter](https://discourse.mailinabox.email/u/openletter)\
**Post date:** [October 15, 2021, 1:08am UTC](https://discourse.mailinabox.email/t/better-attachment-handling/8463/3 "2021-10-15T01:08:21Z")

</div>

> [@edhaas](#):
>
> is there an easy way to reduce the allowed attachment size to force users to create links?

It would be unsupported because it will get rewritten, but ways to do this would include the directives in `nginx`, the `php.ini` configuration, and possibly something in a Roundcube configuration file (sorry, never configured Roundcube so don’t know where to go).

---

<div class="post-metadata">

**Author:** ![Richard5](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/r/87869e/32.png) [@Richard5](https://discourse.mailinabox.email/u/Richard5)\
**Post date:** [October 19, 2021, 3:59pm UTC](https://discourse.mailinabox.email/t/better-attachment-handling/8463/4 "2021-10-19T15:59:52Z")

</div>

Message size limit (including attachments) are set in postfix’s main.cf config file (located in /etc/postfix/main.cf). Look for message\_size\_limit = xxxx (message size is in bytes). It will be overwritten during an upgrade.

Other help might be setting the total mailbox limit, then look in the same file for mailbox\_size\_limit and  
virtual\_mailbox\_limit.

But it is indeed unsupported.

---

<div class="post-metadata">

**Author:** ![S4\_Hosting](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/s4_hosting/32/1465_2.png) [@S4\_Hosting](https://discourse.mailinabox.email/u/S4_Hosting)\
**Post date:** [October 19, 2021, 9:27pm UTC](https://discourse.mailinabox.email/t/better-attachment-handling/8463/5 "2021-10-19T21:27:04Z")

</div>

> [@openletter](#):
>
> and possibly something in a Roundcube configuration file (sorry, never configured Roundcube so don’t know where to go).

You could set it in /usr/local/lib/roundcubemail/config/config.inc.php

Add the following, obviously changing the 10M to desired size, but be aware it will be overwritten on MIAB upgrades.

`$config['max_message_size'] = '10M';`

---

<div class="post-metadata">

**Author:** ![system](https://discourse.mailinabox.email/uploads/default/original/2X/4/4d0933d13c456b7e57f296aa6cc344525b6f0c70.png) [@system](https://discourse.mailinabox.email/u/system)\
**Post date:** [December 15, 2021, 12:33am UTC](https://discourse.mailinabox.email/t/better-attachment-handling/8463/6 "2021-12-15T00:33:36Z")

</div>

This topic was automatically closed after 61 days. New replies are no longer allowed.
