]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/dovecot/sieve/global/spam-or-ham.sieve
openldap: see if something can be upstreamed
[sourcephile-nix.git] / servers / mermet / dovecot / sieve / global / spam-or-ham.sieve
1 require [ "copy", "environment", "imap4flags", "imapsieve", "variables", "vnd.dovecot.pipe" ];
2
3 if environment :is "imap.changedflags" "Junk" {
4 if environment :matches "imap.user" "*" { set "username" "${1}"; }
5 if hasflag :is "Junk" {
6 pipe :copy :try "learn-spam.sh" [ "${username}" ];
7 } elsif not hasflag :is "Junk" {
8 pipe :copy :try "learn-ham.sh" [ "${username}" ];
9 }
10 }