mailsystem: dovecot: Autolearn ham/spam when moving mails
This commit is contained in:
parent
d35763a8a2
commit
0ce3ecae52
3 changed files with 76 additions and 2 deletions
15
mailsystem/dovecot/report-ham.sieve
Normal file
15
mailsystem/dovecot/report-ham.sieve
Normal 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 "learn-ham.sh" [ "${username}" ];
|
||||
Loading…
Add table
Add a link
Reference in a new issue