# RoundCube Attachments

**URL:** <https://discourse.mailinabox.email/t/roundcube-attachments/2644>\
**Category:** Help with Setup/Upgrade\
**Created:** [November 19, 2017, 9:19am UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644 "2017-11-19T09:19:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kobzantsev](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/k/9e8a1a/32.png) [@kobzantsev](https://discourse.mailinabox.email/u/kobzantsev)\
**Post date:** [November 19, 2017, 9:19am UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/1 "2017-11-19T09:19:15Z")

</div>

Hi All!  
I install MIAB by default manuals.  
All works fine!  
But I have one problem.  
When I create email in RoundCube with attachment - email sends without errors but and without attachment.  
Please help me! Where I must configure attachments.

---

<div class="post-metadata">

**Author:** ![maxtel](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/m/7feea3/32.png) [@maxtel](https://discourse.mailinabox.email/u/maxtel)\
**Post date:** [November 19, 2017, 2:44pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/2 "2017-11-19T14:44:22Z")

</div>

I got the same problem now after upgrading from MIAB v.0.24. I even re-ran the update script once again, as someone indicated on another [thread](https://discourse.mailinabox.email/t/v0-25-security-update/2633), but no change. Is the new Roundcube 1.3.3 having a bug?

---

<div class="post-metadata">

**Author:** ![Woodhouse](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/w/d07c76/32.png) [@Woodhouse](https://discourse.mailinabox.email/u/Woodhouse)\
**Post date:** [November 20, 2017, 4:51pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/3 "2017-11-20T16:51:09Z")

</div>

This too has happened to me, after updating to MiaB v0.25.

---

<div class="post-metadata">

**Author:** ![sergiupapuc](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/s/3ec8ea/32.png) [@sergiupapuc](https://discourse.mailinabox.email/u/sergiupapuc)\
**Post date:** [November 21, 2017, 7:20am UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/4 "2017-11-21T07:20:28Z")

</div>

Same here after succes update to v0.25!..any resolution?

---

<div class="post-metadata">

**Author:** ![zanydesigns](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/z/898d66/32.png) [@zanydesigns](https://discourse.mailinabox.email/u/zanydesigns)\
**Post date:** [November 21, 2017, 5:26pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/5 "2017-11-21T17:26:08Z")

</div>

I’m facing same issue with version v0.25 as well.

---

<div class="post-metadata">

**Author:** ![maxtel](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/m/7feea3/32.png) [@maxtel](https://discourse.mailinabox.email/u/maxtel)\
**Post date:** [November 28, 2017, 5:24am UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/6 "2017-11-28T05:24:17Z")

</div>

Looks like other people having the same problem with Roundcube 1.3.3, but no resolution yet:  
[http://www.roundcubeforum.net/index.php?topic=24597.0](http://www.roundcubeforum.net/index.php?topic=24597.0)

---

<div class="post-metadata">

**Author:** ![Edgars](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/e/f17d59/32.png) [@Edgars](https://discourse.mailinabox.email/u/Edgars)\
**Post date:** [November 28, 2017, 9:44am UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/7 "2017-11-28T09:44:51Z")

</div>

I am running into the same issue, after v0.25, discovered this bug only after a while.

---

<div class="post-metadata">

**Author:** ![remi](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/r/ed8c4c/32.png) [@remi](https://discourse.mailinabox.email/u/remi)\
**Post date:** [November 28, 2017, 2:45pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/8 "2017-11-28T14:45:52Z")

</div>

Same issue. Files are attached but not sent. There is no warning that the files aren’t sent.

---

<div class="post-metadata">

**Author:** ![JPUnix](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/jpunix/32/650_2.png) [@JPUnix](https://discourse.mailinabox.email/u/JPUnix)\
**Post date:** [November 30, 2017, 3:19pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/9 "2017-11-30T15:19:12Z")

</div>

same issue here. I guess we can use pointers to cloud services until it’s resolved.

---

<div class="post-metadata">

**Author:** ![yoann](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/yoann/32/653_2.png) [@yoann](https://discourse.mailinabox.email/u/yoann)\
**Post date:** [November 30, 2017, 4:01pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/10 "2017-11-30T16:01:08Z")

</div>

There is an issue on the [github](https://github.com/mail-in-a-box/mailinabox/issues/1290) with a solution I’ve found.

For the sake of it, I’ll copy paste it here:

First locate the roundcube config file `/usr/local/lib/roundcubemail/config/config.inc.php` for me.  
Then, be sure that the folder set in `$config['temp_dir'] = '/tmp/roundcubemail/';` exists.  
It wasn’t the case for me.  
And make it writable by the `www-data` group.

```auto
mkdir /tmp/roundcubemail
sudo chown -R www-data /tmp/roundcubemail/
sudo chmod -R g+rwX /tmp/roundcubemail/

```

And voilà, everything should be fine now.

---

<div class="post-metadata">

**Author:** ![zanydesigns](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/z/898d66/32.png) [@zanydesigns](https://discourse.mailinabox.email/u/zanydesigns)\
**Post date:** [December 2, 2017, 3:09pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/11 "2017-12-02T15:09:13Z")

</div>

I can confirm this fix as well with MIAB version 0.25. Thanks for the post.

---

<div class="post-metadata">

**Author:** ![maxtel](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/m/7feea3/32.png) [@maxtel](https://discourse.mailinabox.email/u/maxtel)\
**Post date:** [December 2, 2017, 10:22pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/12 "2017-12-02T22:22:05Z")

</div>

This workaround works as long as the machine keeps running. After each reboot, the “roundcubemail” folder disappears and it has to be manually recreated over and over again. To me it seems the process responsible for creating this temporary folder during the booting sequence is not doing its job anymore in the new version. What could be the root cause? Roundcube or MIAB?

---

<div class="post-metadata">

**Author:** ![cvgustavo](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/cvgustavo/32/654_2.png) [@cvgustavo](https://discourse.mailinabox.email/u/cvgustavo)\
**Post date:** [December 3, 2017, 7:43pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/13 "2017-12-03T19:43:03Z")

</div>

> [@yoann](#):
>
> First locate the roundcube config file /usr/local/lib/roundcubemail/config/config.inc.php for me.Then, be sure that the folder set in $config[‘temp\_dir’] = ‘/tmp/roundcubemail/’; exists.

set in $config[‘temp\_dir’] = ‘/tmp/’

Problem SOLVED

---

<div class="post-metadata">

**Author:** ![maxtel](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/m/7feea3/32.png) [@maxtel](https://discourse.mailinabox.email/u/maxtel)\
**Post date:** [December 8, 2017, 3:18am UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/14 "2017-12-08T03:18:28Z")

</div>

Working as expected this way, thank you. Good to keep in mind for the upcoming upgrades.

---

<div class="post-metadata">

**Author:** ![angsuman](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/a/e68b1a/32.png) [@angsuman](https://discourse.mailinabox.email/u/angsuman)\
**Post date:** [December 12, 2017, 4:55pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/15 "2017-12-12T16:55:59Z")

</div>

- This is better than /var/tmp solution because it takes care of cleaning up leftover files on reboot.
- This is better than creating directory solution because you don’t have to create directory on every reboot.

---

<div class="post-metadata">

**Author:** ![Woodhouse](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/w/d07c76/32.png) [@Woodhouse](https://discourse.mailinabox.email/u/Woodhouse)\
**Post date:** [December 14, 2017, 10:55pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/16 "2017-12-14T22:55:19Z")

</div>

On reboot, the /tmp/roundcubemail/ directory was removed, again breaking attachments for RoundCubeMail.

Modified to: $config[‘temp\_dir’] = ‘/home/user-data/mail/roundcube/’

Directory retained after reboot = attachments attach and send in RoundCubeMail.

---

<div class="post-metadata">

**Author:** ![paradoxbound](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/p/f19dbf/32.png) [@paradoxbound](https://discourse.mailinabox.email/u/paradoxbound)\
**Post date:** [December 15, 2017, 9:26am UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/17 "2017-12-15T09:26:42Z")

</div>

There is a proper place for tmp files that need to survive reboots, it is defined in the File Standards Hierarchy version 3, that location is “/var/tmp” followed by the name of the application in this case “/var/tmp/roundcube”. Ensure that the directory is readable and writeable by “www-data”.

The directory is used to store attachments while an email is in draft state and the attachment is deleted once the email is sent.

Setting the tmp directory to “/tmp” means users potentially sensitive attachments are placed in a world readable and writeable location not good security.

Creating a directory below /tmp such as “/tmp/roundcube” will not survive a reboot.

Placing that temp directory anywhere else doesn’t follow the FSH and is wrong.

[0] [https://refspecs.linuxfoundation.org/FHS\_3.0/fhs-3.0.html#vartmpTemporaryFilesPreservedBetwee](https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#vartmpTemporaryFilesPreservedBetwee)

---

<div class="post-metadata">

**Author:** ![paradoxbound](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/p/f19dbf/32.png) [@paradoxbound](https://discourse.mailinabox.email/u/paradoxbound)\
**Post date:** [December 15, 2017, 10:18pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/18 "2017-12-15T22:18:10Z")

</div>

I made a PR with changes

> <https://github.com/mail-in-a-box/mailinabox/pull/1302/files>

---

<div class="post-metadata">

**Author:** ![JoshData](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/joshdata/32/2153_2.png) [@JoshData](https://discourse.mailinabox.email/u/JoshData)\
**Post date:** [December 18, 2017, 1:15pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/19 "2017-12-18T13:15:41Z")

</div>

Thanks @paradoxbound! The PR is merged and will be included in the next release!

---

<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 25, 2017, 1:15pm UTC](https://discourse.mailinabox.email/t/roundcube-attachments/2644/20 "2017-12-25T13:15:51Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
