Yesterday I was told that at a customer the vacation scripts don't work anymore. Looking closer it seems the whole sieve-funtionality is missing (eg. filtering mails into folders).
I am in the process of analysing, and don't have a clue yet.
Editing scripts via managesieved works (for example from roundcube).
The scripts are in the right place, afai understand.
I compare this with another setup where things work and don't see the difference.
All this worked perfectly until maybe summer.
This is Debian 12.7 bookworm, the dovecot repo still points to bullseye.
# cat /etc/apt/sources.list.d/dovecot.list deb [arch=amd64 signed-by=/usr/share/keyrings/dovecot.gpg] https://repo.dovecot.org/ce-2.3-latest/debian/bullseye bullseye main
There is rspamd in place with postfix if that is somehow relevant.
The installation is on premise and has maybe 60-100 mailboxes in now 2 domains.
That was the largest change this year: add a so-called "alias domain" in postfixadmin: mailbox@new.domain points to mailbox@old.domain
I assume the sieve scripts should simply be executed as before.
The basics of mailing etc work fine!
I'd appreciate any pointers.
trying to enable debug logs etc, for example I don't get anything into "sieve_user_log"
# 2.3.21.1 (d492236fa0): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.21.1 (49005e73) # OS: Linux 6.1.0-26-amd64 x86_64 Debian 12.7 # Hostname: mail2.my.tld auth_cache_size = 4 M default_process_limit = 300 listen = * mail_home = /mnt/mailboxes/%d/%u mail_location = maildir:~ mail_plugins = " notify quota acl" 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 imapflags imapsieve vnd.dovecot.imapsieve namespace { inbox = yes location = prefix = separator = / type = private } namespace { location = maildir:/home/vmail/oeffentlich prefix = Oeffentlich/ separator = / subscriptions = yes type = public } passdb { args = /etc/dovecot/dovecot-sql.conf driver = sql } plugin { acl = vfile:/etc/dovecot/dovecot-acl:cache_secs=300 acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes imapsieve_mailbox1_before = file:/etc/dovecot/sieve/global/learn-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Spam imapsieve_mailbox2_before = file:/etc/dovecot/sieve/global/learn-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Spam imapsieve_mailbox2_name = * sieve = /home/vmail/%d/%u/sieve/.dovecot.sieve sieve_before = /etc/dovecot/sieve/global/spam-global.sieve sieve_dir = /home/vmail/%d/%u/sieve/scripts/ sieve_extensions = +imapflags sieve_global_extensions = +vnd.dovecot.pipe sieve_pipe_bin_dir = /usr/bin sieve_plugins = sieve_imapsieve sieve_extprograms sieve_trace_dir = /tmp/sieve_trace/ sieve_trace_level = commands sieve_user_log = /home/vmail/%d/%u/sieve/sieve_user.log } protocols = imap sieve lmtp service auth { client_limit = 1200 unix_listener auth-client { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { mode = 0777 } user = root } service imap-login { process_min_avail = 10 } 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 } } ssl = required ssl_ca =
Am 23.10.24 um 08:36 schrieb Stefan G. Weichinger via dovecot:
plugin { acl = vfile:/etc/dovecot/dovecot-acl:cache_secs=300 acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes imapsieve_mailbox1_before = file:/etc/dovecot/sieve/global/learn- spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Spam imapsieve_mailbox2_before = file:/etc/dovecot/sieve/global/learn- ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Spam imapsieve_mailbox2_name = * sieve = /home/vmail/%d/%u/sieve/.dovecot.sieve sieve_before = /etc/dovecot/sieve/global/spam-global.sieve sieve_dir = /home/vmail/%d/%u/sieve/scripts/
current try
sieve = /home/vmail/%d/%u/sieve/scripts/managesieve.sieve
Am 23.10.24 um 09:01 schrieb Stefan G. Weichinger via dovecot:
Am 23.10.24 um 08:55 schrieb Stefan G. Weichinger via dovecot:
current try
sieve = /home/vmail/%d/%u/sieve/scripts/managesieve.sieve
even better (?):
sieve = file:/home/vmail/%d/%u/sieve/scripts;active=/home/vmail/%d/%u/ sieve/scripts/.dovecot.sieve
I fiddle with dirs and subdirs ... and sieve-test.
These tests look perfectly ok, although mails are NOT filtered when I send testmails via client or so).
tree of users sieve-dir:
/home/vmail/domain.at/stefan.weichinger@domain.at/sieve# tree . └── scripts ├── managesieve.sieve ├── managesieve.svbin └── tmp
# ls -la scripts/ insgesamt 20 drwx------ 3 vmail vmail 4096 23. Okt 11:58 . drwx------ 3 vmail vmail 4096 23. Okt 11:46 .. lrwxrwxrwx 1 vmail vmail 17 23. Okt 11:52 .dovecot.sieve -> managesieve.sieve -rw------- 1 vmail vmail 292 23. Okt 11:55 managesieve.sieve -rw------- 1 vmail vmail 576 23. Okt 11:58 managesieve.svbin drwx------ 2 vmail vmail 4096 23. Okt 11:55 tmp
changes in conf:
plugin { # quota = dict:User quota::proxy::quota #sieve = /home/vmail/%d/%u/sieve/.dovecot.sieve sieve = file:/home/vmail/%d/%u/sieve/scripts;active=/home/vmail/%d/%u/sieve/scripts/.dovecot.sieve sieve_global = /etc/dovecot/sieve/global/default.sieve sieve_before = /etc/dovecot/sieve/global/spam-global.sieve
sieve_extensions = +imapflags
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_pipe_bin_dir = /etc/dovecot/sieve/global
-- editing sieve-scripts via managesieve / roundcube works fine as well.
I don't see it ...
Am 23.10.24 um 16:06 schrieb Benny Pedersen via dovecot:
Stefan G. Weichinger via dovecot skrev den 2024-10-23 09:01:
ok?
i have
sieve = file:~/.sieve;active=~/.dovecot.sieve
note the ~ char :=)
mails is here in ~/.maildir so sieve data is not in maildir home
$home for my users comes from a db query and not from /etc/passwd or so
that query should be OK as normal mailing etc works great
I changed the setting slightly:
sieve = file:/home/vmail/%d/%u/sieve/scripts;active=/home/vmail/%d/%u/sieve/.dovecot.sieve
edited filters in roundcube etc, checked symlink, looks ok
But it seems sieve isn't really working to me.
I temporarily disabled that learning stuff with rspamd and modernized the used scripts etc
Right now I have:
# 2.3.21.1 (d492236fa0): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.21.1 (49005e73) # OS: Linux 6.1.0-26-amd64 x86_64 Debian 12.7
auth_cache_size = 4 M debug_log_path = /var/log/dovecot-debug.log default_process_limit = 300 info_log_path = /var/log/dovecot-info.log listen = * log_path = /var/log/dovecot.log mail_debug = yes mail_home = /mnt/mailboxes/%d/%u mail_location = maildir:~ mail_plugins = " notify quota acl" 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 spamtest spamtestplus virustest editheader mboxmetadata servermetadata imapsieve vnd.dovecot.imapsieve namespace { inbox = yes location = prefix = separator = / type = private } namespace { location = maildir:/home/vmail/oeffentlich prefix = Oeffentlich/ separator = / subscriptions = yes type = public } passdb { args = /etc/dovecot/dovecot-sql.conf driver = sql } plugin { acl = vfile:/etc/dovecot/dovecot-acl:cache_secs=300 acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Spam imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Spam imapsieve_mailbox2_name = * sieve = file:/home/vmail/%d/%u/sieve/scripts;active=/home/vmail/%d/%u/sieve/.dovecot.sieve sieve_extensions = +editheader +mboxmetadata +servermetadata +spamtest +spamtestplus +virustest sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.debug +vnd.dovecot.environment sieve_pipe_bin_dir = /usr/lib/dovecot/sieve sieve_plugins = sieve_imapsieve sieve_extprograms sieve_spamtest_max_value = 6 sieve_spamtest_status_header = X-Spamd-Result: .*? \[([[:digit:]]+\.[[:digit:]]+) / [[:digit:]]+\.[[:digit:]]+\]; sieve_spamtest_status_type = score sieve_trace_dir = /tmp/sieve_trace/ sieve_trace_level = commands sieve_user_log = /home/vmail/%d/%u/sieve/sieve_user.log } protocols = imap sieve lmtp service auth { client_limit = 1200 unix_listener auth-client { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { mode = 0777 } user = root } service imap-login { process_min_avail = 10 } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } service managesieve-login { inet_listener sieve { port = 4190 } } ssl = required ssl_ca =
Hi Stefan,
On 23.10.24 17:02, Stefan G. Weichinger via dovecot wrote:
I changed the setting slightly:
sieve = file:/home/vmail/%d/%u/sieve/scripts;active=/home/vmail/%d/%u/ sieve/.dovecot.sieve
edited filters in roundcube etc, checked symlink, looks ok
so in this directory:
/home/vmail/%d/%u/sieve
now there's:
- the following symlink, right?:
.dovecot.sieve -> scripts/managesieve.sieve
- and this file too?:
.dovecot.svbin
But it seems sieve isn't really working to me.
Really strange ...
And another question - did you also change your 20-lmtp.conf, especially 'mail_plugins'?
Now your 'doveconf -n' shows (which seems OK to me):
protocol lmtp { mail_debug = yes mail_plugins = " notify quota acl sieve" postmaster_address = logs@xunil.at }
but in your first posting you had this:
protocol lmtp { mail_debug = yes mail_plugins = sieve postmaster_address = logs@my.tld }
And one last question: are there any log entries regarding LMTP and Sieve while delivering a new mail to a mailbox with active filters?
I just check one of my Bookworm systems with a quite similar setup but with the original Debian Dovecot packages:
# 2.3.19.1 (9b53102964): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.19 (4eae2f79) # OS: Linux 6.1.0-26-amd64 x86_64 Debian 12.7 ext4
and don't have any problems with Sieve - it just works.
Regards, Markus
On 23-10-2024 17:02, Stefan G. Weichinger via dovecot wrote:
Am 23.10.24 um 16:06 schrieb Benny Pedersen via dovecot:
Stefan G. Weichinger via dovecot skrev den 2024-10-23 09:01:
ok?
i have
sieve = file:~/.sieve;active=~/.dovecot.sieve
note the ~ char :=)
mails is here in ~/.maildir so sieve data is not in maildir home
$home for my users comes from a db query and not from /etc/passwd or so
that query should be OK as normal mailing etc works great
I changed the setting slightly:
sieve = file:/home/vmail/%d/%u/sieve/scripts;active=/home/vmail/%d/%u/sieve/.dovecot.sieve
edited filters in roundcube etc, checked symlink, looks ok
But it seems sieve isn't really working to me.
I temporarily disabled that learning stuff with rspamd and modernized the used scripts etc
Right now I have:
# 2.3.21.1 (d492236fa0): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.21.1 (49005e73) # OS: Linux 6.1.0-26-amd64 x86_64 Debian 12.7
auth_cache_size = 4 M debug_log_path = /var/log/dovecot-debug.log default_process_limit = 300 info_log_path = /var/log/dovecot-info.log listen = * log_path = /var/log/dovecot.log mail_debug = yes mail_home = /mnt/mailboxes/%d/%u mail_location = maildir:~ mail_plugins = " notify quota acl" 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 spamtest spamtestplus virustest editheader mboxmetadata servermetadata imapsieve vnd.dovecot.imapsieve namespace { inbox = yes location = prefix = separator = / type = private } namespace { location = maildir:/home/vmail/oeffentlich prefix = Oeffentlich/ separator = / subscriptions = yes type = public } passdb { args = /etc/dovecot/dovecot-sql.conf driver = sql } plugin { acl = vfile:/etc/dovecot/dovecot-acl:cache_secs=300 acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Spam imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Spam imapsieve_mailbox2_name = * sieve = file:/home/vmail/%d/%u/sieve/scripts;active=/home/vmail/%d/%u/sieve/.dovecot.sieve sieve_extensions = +editheader +mboxmetadata +servermetadata +spamtest +spamtestplus +virustest sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.debug +vnd.dovecot.environment sieve_pipe_bin_dir = /usr/lib/dovecot/sieve sieve_plugins = sieve_imapsieve sieve_extprograms sieve_spamtest_max_value = 6 sieve_spamtest_status_header = X-Spamd-Result: .*? \[([[:digit:]]+\.[[:digit:]]+) / [[:digit:]]+\.[[:digit:]]+\]; sieve_spamtest_status_type = score sieve_trace_dir = /tmp/sieve_trace/ sieve_trace_level = commands sieve_user_log = /home/vmail/%d/%u/sieve/sieve_user.log } protocols = imap sieve lmtp service auth { client_limit = 1200 unix_listener auth-client { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { mode = 0777 } user = root } service imap-login { process_min_avail = 10 } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } service managesieve-login { inet_listener sieve { port = 4190 } } ssl = required ssl_ca =
Hi Stefan,
I think you havent;showed us any logging yet. Can you show logging from a complete delivery starting where postfix accepts a message, until dovecot puts it in your inbox?
In my logs, I can clearly see sieve handling my incoming messages, yours should show that too. So please show us the logs for a complete transaction.
Kind regards, Tom
participants (4)
-
Benny Pedersen
-
Markus Winkler
-
Stefan G. Weichinger
-
Tom Hendrikx