Op 1/1/2018 om 1:04 PM schreef Ludovic Terrier:
Hello,
First of all, happy new year!
I’ve recently configured my mail server and was using a simple sieve rule in order to store all my ‘user+pattern@example.com’ ingoing email to be stored in the INBOX/pattern folder. This setup worked very well. I restarted my server this morning (don’t know if it’s related…) and since Dovecot keep storing my emails in INBOX with following errors:
root@server:~# cat /var/mail/vhosts/example.com/ludovic/.dovecot.sieve.log sieve: info: started log at Jan 01 12:13:56. error: msgid=<20180101111353.C332C25386@server.example.com>: failed to store into mailbox 'INBOX/${1}': Mailbox doesn't exist: INBOX/${1}.
Sieve script: root@server:~# cat /var/mail/vhosts/example.com/ludovic/sieve/roundcube.sieve require ["envelope","fileinto","subaddress"]; if header :contains "X-Spam-Flag" "YES" { fileinto "Junk"; } if envelope :detail :matches "to" "*" { fileinto "INBOX/${1}"; } # rule:[contact] if allof (header :contains "to" "contact@example.com") { fileinto "INBOX/contact"; stop; }
I don’t remember having made recent change in my Dovecot config… only adding the last rule in the sieve script. Any hint? Thanks.
Please find below more info of my Dovecot setup (quite long). Is it better to use some pastebin for such long info?
The problem makes sense. The use of the ":matches" match type with "${1}" used in the if block hints that the "variables" extension is supposed to be used. However, it is not listed in the require line. In that case any variables substitution is ignored, causing the error you're seeing.
If this is what RoundCube outputs, there's something wrong with RoundCube.
Regards,
Stephan.