sieve - Failed to store into mailbox 'INBOX/${1}': Mailbox doesn't exist: INBOX/${1}
Ludovic Terrier
ludovic at terrier.im
Mon Jan 1 14:04:46 EET 2018
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 at 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 at 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 at server.example.com>: failed to store into mailbox 'INBOX/${1}': Mailbox doesn't exist: INBOX/${1}.
Sieve script:
root at 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 at 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?
Regards,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Info (version and dovecot -n):
root at server:~# dovecot --version
2.2.27 (c0f36b0)
root at helios:~# dovecot -n
# 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
doveconf: Warning: service auth { client_limit=1000 } is lower than required under max. load (1524)
# OS: Linux 4.9.0-4-amd64 x86_64 Debian 9.3
auth_cache_size = 10 M
auth_username_format = %Ln
first_valid_uid = 999
imap_idle_notify_interval = 29 mins
last_valid_uid = 999
mail_attachment_dir = /var/mail/attachments
mail_attachment_min_size = 64 k
mail_fsync = never
mail_home = /var/mail/vhosts/%d/%n
mail_location = mdbox:~/mdbox
mail_privileged_group = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapsieve
namespace inbox {
inbox = yes
location =
mailbox Archive {
auto = subscribe
special_use = \Archive
}
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = create
special_use = \Junk
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
auto = create
special_use = \Trash
}
prefix =
separator = /
}
passdb {
args = /etc/dovecot/dovecot-ldap.conf.ext
driver = ldap
}
plugin {
imapsieve_mailbox1_before = file:/etc/dovecot/sieve/report-spam.sieve
imapsieve_mailbox1_causes = COPY
imapsieve_mailbox1_name = Junk
imapsieve_mailbox2_before = file:/etc/dovecot/sieve/report-ham.sieve
imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_from = Junk
imapsieve_mailbox2_name = *
recipient_delimiter = +
sieve = file:~/sieve;active=~/.dovecot.sieve
sieve_after = /usr/local/etc/dovecot/sieve-after.d
sieve_before = /usr/local/etc/dovecot/sieve-before.d
sieve_global_extensions = +vnd.dovecot.pipe
sieve_pipe_bin_dir = /etc/dovecot/sieve
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_quota_max_storage = 50M
}
protocols = " imap lmtp sieve sieve"
service auth-worker {
user = vmail
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
service imap-login {
inet_listener imap {
address = 127.0.0.1, ::1
}
process_min_avail = 2
service_count = 0
vsz_limit = 1 G
}
service imap {
process_min_avail = 2
service_count = 256
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service pop3-login {
inet_listener pop3 {
port = 0
}
inet_listener pop3s {
port = 0
}
}
ssl = required
ssl_cert = </etc/letsencrypt/pem/server.example.com.pem
ssl_cipher_list = ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
ssl_dh_parameters_length = 2048
ssl_key = # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
ssl_protocols = !SSLv3 !TLSv1 !TLSv1.1 TLSv1.2
userdb {
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static
}
protocol lmtp {
mail_fsync = optimized
mail_plugins = " sieve"
}
protocol lda {
mail_fsync = optimized
mail_plugins = " sieve"
}
protocol imap {
mail_max_userip_connections = 50
mail_plugins = " imap_sieve »
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
—
Ludovic
More information about the dovecot
mailing list