[Solved] Dovecot: failed to create temporary files

Problem Description
When looking at the logs in Cockpit, I’m seeing the following error:

lmtp(someuser)<284973><2O+wHWJWmWctWQQAQV3QyQ>: Error: sieve: binary /etc/dovecot/freedombox-sieve-after/sort-spam.svbin: save: failed to create temporary file: open(/etc/dovecot/freedombox-sieve-after/sort-spam.svbin.) failed: Read-only file system

I don’t know what’s causing it, but looking online I saw this post from 2017 that talks about ProtectSystem= in systemd.

I’m wondering if it’s something that needs to be addressed or something that can be ignored? Thank you!

Information

  • FreedomBox version: Debian GNU/Linux 12 (bookworm) and FreedomBox version 25.1
  • Hardware: VPS
  • How did you install FreedomBox?: apt install freedombox

FreedomBox ships the the file /etc/dovecot/freedombox-sieve-after/sort-spam.sieve to move emails with high spam score to the Junk folder. This file is compiled into a binary file /etc/dovecot/freedombox-sieve-after/sort-spam.svbin during the setup of the email app (using the command sievec /etc/dovecot/freedombox-sieve-after/. Dovecot should not have to compile this file again, I think.

Please do ls -l /etc/dovecot/freedombox-sieve-after and see what files are in the folder and their modification timestamps. See if running re-setup on email app fixes the issue (it should be safe). Otherwise, try running sievec /etc/dovecot/freedombox-sieve-after/ as root and restart system or dovecot.

Lastly, we can also provide ReadWritePaths=/etc/dovecot/freedombox-sieve-after in the systemd unit for dovecot.

Thank you! I ran re-setup and here’s the timestamps. What should I be looking out for? Should I still run sievec?

$ ls -l
total 8
lrwxrwxrwx 1 root root  72 Nov  8 10:12 sort-spam.sieve -> /usr/share/freedombox/etc/dovecot/freedombox-sieve-after/sort-spam.sieve
-rw-r--r-- 1 root root 287 Jan 12 06:13 sort-spam.svbin

Then after re-setup:

$ ls -l
total 8
lrwxrwxrwx 1 root root  72 Nov  8 10:12 sort-spam.sieve -> /usr/share/freedombox/etc/dovecot/freedombox-sieve-after/sort-spam.sieve
-rw-r--r-- 1 root root 287 Jan 28 18:24 sort-spam.svbin
1 Like

Looks like FreedomBox setup process is doing its job properly and producing the .svbin file properly. I don’t know why dovecot would try to do this again and complain about permissions but it should completely harmless. There might be a setting for dovecot to let it know that it does need to compile sieve scripts.

Ok I’ve been monitoring the logs and it looks like it hasn’t happened since I re-ran the setup so I think that worked! I’ll mark this as solved for now but I’ll keep an eye.

Thank you so much for the help!