RoundCube Attachments

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.

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, but no change. Is the new Roundcube 1.3.3 having a bug?

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

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

Iā€™m facing same issue with version v0.25 as well.

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

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

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

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

There is an issue on the github 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.

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

And voilĆ , everything should be fine now.

2 Likes

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

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?

1 Like

set in $config[ā€˜temp_dirā€™] = ā€˜/tmp/ā€™

Problem SOLVED

1 Like

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

  • 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.

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.

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

I made a PR with changes

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

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