mail: put spam sieve scripts into /etc

This commit is contained in:
Rouven Seifert 2023-09-04 13:10:01 +02:00
parent a0f78133f6
commit 11b0903535
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
3 changed files with 36 additions and 2 deletions

15
modules/mail/report-ham.sieve Executable file
View file

@ -0,0 +1,15 @@
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.user" "*" {
set "username" "${1}";
}
pipe :copy "sa-learn-ham.sh" [ "${username}" ];