test
[hcoop/zz_old/ikiwiki] / SpamAssassinFilter.mdwn
diff --git a/SpamAssassinFilter.mdwn b/SpamAssassinFilter.mdwn
new file mode 100755 (executable)
index 0000000..4f77254
--- /dev/null
@@ -0,0 +1,37 @@
+It is possible to set up custom filters to do fancy things based on the X-Spam-Level: header.  Here is NathanKennedy's .forward file.  He finds that the default setting of 5.0 is too wimpy, and lets too much spam into his inbox.  Virtually no ham that he gets scores less than 3.0, whereas a lot of spam scores less than 5.0, so he'd rather have anything over 3.0 go to his Junk folder.  At the same time, he doesn't want to waste time, cycles, disk space or bandwidth with spam over 9.0.  Most of his spam does score 9.0, and this goes straight to /dev/null (immediately disposed of) with this filter.\r
+\r
+Finally, he has all HCoop list email go into a special HCoop folder.\r
+\r
+Without further ado:\r
+\r
+{{{\r
+# Nathan's exim filter\r
+\r
+logfile $home/spamlog\r
+\r
+if $header_subject contains "[HCoop"\r
+then\r
+    save $home/Maildir/.HCoop/\r
+    finish\r
+endif\r
+\r
+if\r
+    "${if def:h_X-Spam-Level {def}{undef}}" is "def"\r
+then\r
+    if $h_X-Spam-Level: begins "\*\*\*\*\*\*\*\*\*"\r
+    then save "/dev/null" 660\r
+    else\r
+      if $h_X-Spam-Level: begins "\*\*\*"\r
+      then save $home/Maildir/.Junk/\r
+      endif\r
+    endif\r
+    finish\r
+endif\r
+\r
+if\r
+    "${if def:h_X-Spam-Flag {def}{undef}}" is "def"\r
+then\r
+    save $home/Maildir/.Junk/\r
+    finish\r
+endif\r
+}}}\r