lmtp(inge@xxx.com)<3161746><wLRLNlOvVmeSPjAAqrKISg>: sieve: msgid=<CACxh+MLsBhS7PY48A0KEm6Zpq0NB2a17TfE4=sid-ktSGbc5sg@mail.gmail.com>: fileinto action: failed to store into mailbox 'Spam': Mailbox doesn't exist: Spam
I'm trying to follow the instructions on "Replacing antispam plugin with IMAPSieve"
https://doc.dovecot.org/2.3/configuration_manual/howto/antispam_with_sieve/
and have encountered the following error
Dec 09 08:50:27 Error: lmtp(inge@xxx.com)<3161746><wLRLNlOvVmeSPjAAqrKISg>: sieve: msgid=<CACxh+MLsBhS7PY48A0KEm6Zpq0NB2a17TfE4=sid-ktSGbc5sg@mail.gmail.com>: fileinto action: failed to store into mailbox 'Spam': Mailbox doesn't exist: Spam
This is a dump of the configuration ++++++++++++++++++++++++++ # 2.3.21 (47349e2482): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.21 (f6cd4b8e) # OS: Linux 6.8.0-49-generic x86_64 Ubuntu 24.04.1 LTS ext4 # Hostname: xxx.xxx.com auth_mechanisms = plain login dsync_features = empty-header-workaround imapc_features = rfc822.size fetch-headers imapc_host = imap2.xxx.com imapc_list_prefix = INBOX imapc_port = 993 imapc_user = %u log_path = /var/log/dovecot.log login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k mail_debug = yes mail_gid = vmail mail_location = maildir:/home/vmail/mailboxes/%d/%n mail_prefetch_count = 20 mail_privileged_group = vmail mail_uid = 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 vnd.dovecot.imapsieve namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Spam { special_use = \Junk } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { imapsieve_mailbox1_before = file:/home/vmail/sieve/global/learn-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Junk imapsieve_mailbox2_before = file:/home/vmail/sieve/global/learn-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk imapsieve_mailbox2_name = * sieve = file:/home/vmail/sieve/%d/%n/scripts;active=/home/vmail/sieve/%d/%n/active-script.sieve sieve_before = /home/vmail/sieve/global/spam-global.sieve sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment sieve_pipe_bin_dir = /usr/lib/dovecot/sieve sieve_plugins = sieve_imapsieve sieve_extprograms } protocols = " imap lmtp sieve" service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { group = vmail mode = 0660 user = vmail } } service imap-login { inet_listener imaps { port = 993 ssl = yes } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } user = vmail } service managesieve-login { inet_listener sieve { port = 4190 } } service managesieve { process_limit = 1024 } ssl = required ssl_cert = </etc/letsencrypt/live/xxx.com/fullchain.pem ssl_client_ca_dir = /etc/ssl ssl_dh = # hidden, use -P to show it ssl_key = # hidden, use -P to show it ssl_prefer_server_ciphers = yes userdb { driver = passwd } userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lmtp { mail_plugins = " sieve" postmaster_address = adm@xxx.com } protocol imap { imap_idle_notify_interval = 29 mins mail_max_userip_connections = 20 mail_plugins = " quota imap_quota imap_sieve notify replication" }
++++++++++++++++++++++++++
Thanks Leo
On 09/12/2024 16:15 EET Poldi via dovecot <dovecot@dovecot.org> wrote:
I'm trying to follow the instructions on "Replacing antispam plugin with IMAPSieve"
https://doc.dovecot.org/2.3/configuration_manual/howto/antispam_with_sieve/
and have encountered the following error
Dec 09 08:50:27 Error: lmtp(inge@xxx.com)<3161746><wLRLNlOvVmeSPjAAqrKISg>: sieve: msgid=<CACxh+MLsBhS7PY48A0KEm6Zpq0NB2a17TfE4=sid-ktSGbc5sg@mail.gmail.com>: fileinto action: failed to store into mailbox 'Spam': Mailbox doesn't exist: Spam
imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Junk imapsieve_mailbox2_before = file:/home/vmail/sieve/global/learn-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk imapsieve_mailbox2_name = *
For one, i think you should use \Junk here, or Spam.
Also your Spam mailbox isn't set to auto=create or auto=subscribe, so it won't be autocreated. You can use fileinto :create in your Sieve script to ensure the folder is created.
Aki
participants (2)
-
Aki Tuomi
-
leo1subscr@zudiewiener.com