Hi Christian,
yes, it's from the genuine Dovecot documentation. But I tried also a lot of
other tutorials. They're almost the same except the external scrips for rspamd.
The result was every time the same: Nothing noticeable in the log.
>Have you checked that your .sieve files have been compiled with sievec, eg
>have a .svbin extension?
Yes, they are.
>Are the scripts being called executable?
Yes, they are 755
Here's my doveconf -n:
# 2.3.19.1 (9b53102964): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.19 (4eae2f79)
# OS: Linux 6.1.0-21-amd64 x86_64 Debian 12.5
# Hostname: ServerIV-home.demo.example
auth_mechanisms = plain login
mail_debug = yes
mail_location = maildir:~/Maildir
mail_privileged_group = mail
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 {
hidden = no
ignore_on_failure = no
inbox = yes
list = yes
location =
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Spam {
auto = subscribe
special_use = \Junk
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix = INBOX/
separator = /
subscriptions = yes
type = private
}
passdb {
driver = pam
}
passdb {
args = scheme=CRYPT username_format=%u /etc/dovecot/users
driver = passwd-file
}
plugin {
imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve
imapsieve_mailbox1_causes = COPY APPEND FLAG
imapsieve_mailbox1_name = Spam
imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve
imapsieve_mailbox2_causes = COPY APPEND FLAG
imapsieve_mailbox2_from = Spam
imapsieve_mailbox2_name = *
sieve = file:~/sieve;active=~/.dovecot.sieve
sieve_after = /etc/dovecot/conf.d/custom-sieve/global_after.sieve
sieve_before = /etc/dovecot/conf.d/custom-sieve/global_before.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 {
mode = 0666
}
}
service lmtp {
inet_listener lmtp {
address = 127.0.0.1 ::1
port = 24
}
}
ssl_cert = </etc/dovecot/private/dovecot.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
driver = passwd
}
userdb {
args = username_format=%u /etc/dovecot/users
driver = passwd-file
}
verbose_proctitle = yes
protocol lmtp {
mail_plugins = " sieve"
}
protocol imap {
mail_plugins = " imap_sieve"
}
And this is what happens, if I move a mail from Inbox to Spam:
# journalctl -u dovecot -f | grep sieve:
imap([email protected])<1503><frRYejEc7vPAqB4a>: Debug: imapsieve: mailbox
INBOX: FLAG event (changed flags: \Deleted)
imap([email protected])<1518><VBvZgzEcc/TAqB4a>: Debug: Module loaded:
/usr/lib/dovecot/modules/lib95_imap_sieve_plugin.so
imap([email protected])<1518><VBvZgzEcc/TAqB4a>: Debug: imapsieve: mailbox
INBOX/Spam: APPEND event
imap([email protected])<1518><VBvZgzEcc/TAqB4a>: Debug: sieve: Pigeonhole
version 0.5.19 (4eae2f79) initializing
imap([email protected])<1518><VBvZgzEcc/TAqB4a>: Debug: sieve: include:
sieve_global is not set; it is currently not possible to include `:global'
scripts.
imap([email protected])<1518><VBvZgzEcc/TAqB4a>: Debug: sieve: Sieve imapsieve
plugin for Pigeonhole version 0.5.19 (4eae2f79) loaded
imap([email protected])<1518><VBvZgzEcc/TAqB4a>: Debug: sieve: Sieve
Extprograms plugin for Pigeonhole version 0.5.19 (4eae2f79) loaded
imap([email protected])<1518><VBvZgzEcc/TAqB4a>: Debug: imapsieve: Static
mailbox rule [1]: mailbox=`Spam' from=`*' causes=(COPY APPEND FLAG) =>
before=`file:/usr/lib/dovecot/sieve/report-spam.sieve' after=(none)
imap([email protected])<1518><VBvZgzEcc/TAqB4a>: Debug: imapsieve: Static
mailbox rule [2]: mailbox=`*' from=`Spam' causes=(COPY APPEND FLAG) =>
before=`file:/usr/lib/dovecot/sieve/report-ham.sieve' after=(none)
imap([email protected])<1503><frRYejEc7vPAqB4a>: Debug: imapsieve: mailbox
INBOX: FLAG event (changed flags: \Seen)
Regards
Jens
-----Ursprüngliche Nachricht-----
Von: Christian Kivalo via dovecot <[email protected]>
Gesendet: Sonntag, 30. Juni 2024 22:07
An: [email protected]
Betreff: Re: IMAPSieve plugin will not run rspamd script
On June 30, 2024 7:57:26 PM GMT+02:00, postfix_dovecot--- via dovecot
<[email protected]> wrote:
>Tried it now in every known combination. Nothing changes. It's my 7th
>evening about this and I'm starting to despair :(
Your config roughly looks like you followed
<https://doc.dovecot.org/3.0/configuration_manual/howto/antispam_with_sieve/>
Please post doveconf -n to the list.
Have you checked that your .sieve files have been compiled with sievec, eg have
a .svbin extension?
Are the scripts being called executable?
--
Christian Kivalo
_______________________________________________
dovecot mailing list -- [email protected] To unsubscribe send an email to
[email protected]
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]