]> Git — Sourcephile - sourcephile-nix.git/blob - hosts/mermet/dovecot/sieve/global/spam-or-ham.sieve
nix: update to nixos-24.11
[sourcephile-nix.git] / hosts / 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 }