[email] Cannot move messages in or out of Junk: Failed to initialise temporary dir

:uk:/:us:

My YunoHost server

Hardware: Odroid N2+
YunoHost version: 11.2.4 (stable)
I have access to my server : yes, full access (home server)
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : very little tweaking
If yes, please explain: modifying postfix and dnsmasq to keep email out of yunohost for some domains, cf. the following post

Description of my issue

My main email is managed by YunoHost. For some reason I cannot move email in and out on the Junk folder.

  • Within Evolution, I get the following error: Erreur lors du déplacement des messages: Failed to initialise temporary dir (0.005 + 0.000 + 0.004 secs).
  • Within the mail app in Nextcloud, email just don’t move when drag and dropped to the Junk folder.
  • Within k9 on Android, I can move Junk email but it seems to be only local and doesn’t sync back to the server. From other clients, mail still appear in the Inbox folder.

It seems to be an issue with Dovecot and more specifically the antispam plugin as someone pointed here but I failed at debugging the issue. I don’t see any error:
– I tried debugging variables for Evolution
– I looked at journalctl entries
– I ran doveadm log errorsand went through /var/log/mail.log

From YunoHost admin portal, I can read the following dovecot log:

Sep 10 20:18:57 dovecot[3157245]: imap-login: Login: user=<djib>, method=PLAIN, rip=x.x.x.x, lip=192.168.x.x, mpid=2848967, TLS, session=<xxxxxxxxxxx>
Sep 10 20:18:57 imap[2848967]: antispam: plugin initialising (2.0-notgit)
Sep 10 20:18:57 imap[2848967]: antispam: "Junk" is exact match spam folder
Sep 10 20:18:57 imap[2848967]: antispam: "SPAM" is exact match spam folder
Sep 10 20:18:57 imap[2848967]: antispam: no unsure folders
Sep 10 20:18:57 imap[2848967]: antispam: "Trash" is exact match trash folder
Sep 10 20:18:57 imap[2848967]: antispam: pipe backend spam argument = learn_spam
Sep 10 20:18:57 imap[2848967]: antispam: pipe backend not-spam argument = learn_ham
Sep 10 20:18:57 imap[2848967]: antispam: pipe backend program = /usr/bin/rspamc
Sep 10 20:18:57 imap[2848967]: antispam: pipe backend program arg[0] = -h
Sep 10 20:18:57 imap[2848967]: antispam: pipe backend program arg[1] = localhost:11334
Sep 10 20:18:57 imap[2848967]: antispam: pipe backend program arg[2] = -P
Sep 10 20:18:57 imap[2848967]: antispam: pipe backend program arg[3] = q1
Sep 10 20:18:57 imap[2848967]: antispam: pipe backend tmpdir /tmp

Log ends here, so I guess the issue indeed happens in the antispam plugin, when calling rspamc on that /tmp directory… but I don’t know what else to do to further debug.

Any help would be appreciated.

Hello,

I seem to have found the solution.

Process dovecot/anvil runs in a chrooted environment:

$ ls -ld /proc/`ps -ef | grep dovecot | grep anvil | awk '{print $2}'`/root
lrwxrwxrwx 1 root root 0 Oct  3 09:39 /proc/948978/root -> /run/dovecot/empty

There is no tmp folder in that chrooted environment, so I created a tmp folder in /run/dovecot/empty and I no longer have the error.

As to why I am the only one having that issue, or if my solution is the proper one… I cannot tell :smiley:

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