[Rspamd-Users] bayes - dovecot/sieve question
Stanislav
me at rooty.name
Mon Sep 25 18:40:54 UTC 2023
Greetings,
I struggle to understand the configuration for dovecot/sieve trigger
learning spam/ham.
I'm following this 3rd party manual:
https://www.c0ffee.net/blog/mail-server-guide
So there are following components/files:
=========== /usr/local/etc/dovecot/sieve/report-spam.sieve
require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment",
"variables"];
if environment :matches "imap.email" "*" {
set "email" "${1}";
}
pipe :copy "train-spam.sh" [ "${email}" ];
=========== /usr/local/etc/dovecot/sieve/report-ham.sieve
require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment",
"variables"];
if environment :matches "imap.mailbox" "*" {
set "mailbox" "${1}";
}
if string "${mailbox}" "Trash" {
stop;
}
if environment :matches "imap.email" "*" {
set "email" "${1}";
}
pipe :copy "train-ham.sh" [ "${email}" ];
=========== /usr/local/etc/dovecot/sieve/train-spam.sh
exec /usr/local/bin/rspamc -h /var/run/rspamd/rspamd.sock learn_spam
=========== /usr/local/etc/dovecot/sieve/train-ham.sh
exec /usr/local/bin/rspamc -h /var/run/rspamd/rspamd.sock learn_ham
Now, when I move a letter to junk to trigger it - I'm confused about how
exactly "rspamc learn_spam" knows what exact email needs to learn. From
what I see we pass an "email" only.
Will appreciate any help
More information about the Users
mailing list