aboutsummaryrefslogtreecommitdiff
path: root/app/build/dovecot/conf/report-ham.sieve
diff options
context:
space:
mode:
authorQuentin <quentin@deuxfleurs.fr>2020-11-27 14:41:57 +0100
committerQuentin <quentin@deuxfleurs.fr>2020-11-27 14:41:57 +0100
commitd241948034cc2f0dc9691520495f98bf84dd4338 (patch)
tree0fd81d45745be4949ecc5c5137a9ddf31895e625 /app/build/dovecot/conf/report-ham.sieve
parente2bb0e1b4ea9597db127b87c464f2933d5e01f38 (diff)
downloadinfrastructure-d241948034cc2f0dc9691520495f98bf84dd4338.tar.gz
infrastructure-d241948034cc2f0dc9691520495f98bf84dd4338.zip
Add missing dovecot conf files
Diffstat (limited to 'app/build/dovecot/conf/report-ham.sieve')
-rw-r--r--app/build/dovecot/conf/report-ham.sieve17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/build/dovecot/conf/report-ham.sieve b/app/build/dovecot/conf/report-ham.sieve
new file mode 100644
index 0000000..c5a994a
--- /dev/null
+++ b/app/build/dovecot/conf/report-ham.sieve
@@ -0,0 +1,17 @@
+require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables", "vnd.dovecot.debug"];
+
+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", "-u", "debian-spamd" ];
+debug_log "ham reported by ${username}";
+