]> git.madduck.net Git - etc/mailfilter.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add spam pattern matching
authormartin f. krafft <madduck@madduck.net>
Wed, 27 Feb 2008 10:52:27 +0000 (11:52 +0100)
committermartin f. krafft <madduck@madduck.net>
Wed, 27 Feb 2008 10:52:27 +0000 (11:52 +0100)
config/spampatterns [new file with mode: 0644]
procmail/spamfilter
procmail/spampat [new file with mode: 0644]

diff --git a/config/spampatterns b/config/spampatterns
new file mode 100644 (file)
index 0000000..5b96fd3
--- /dev/null
@@ -0,0 +1 @@
+^Subject:.+% OFF$
index b0d279370be02e07507a0216b2e555a3bd005314..491f157939f95f423f179921b24fd06e7430c42e 100755 (executable)
@@ -99,6 +99,7 @@ PMDIR=${PMDIR:-$HOME/.etc/mailfilter/procmail}
 {
   INCLUDERC=$PMDIR/spamtraps
   INCLUDERC=$PMDIR/spammers
+  INCLUDERC=$PMDIR/spampat
   INCLUDERC=$PMDIR/pre-spam-cleanup
 
   # crm114
diff --git a/procmail/spampat b/procmail/spampat
new file mode 100644 (file)
index 0000000..c8e0e15
--- /dev/null
@@ -0,0 +1,8 @@
+:0
+* ? $EGREP -qif $CONF/spampatterns
+{
+  SPAMTRAPPED="matches a spam pattern"
+  LOG="spampat:     $SPAMTRAPPED$NL"
+}
+
+# vim:ft=procmail