]> 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 subject cleaner
authormartin f. krafft <madduck@madduck.net>
Tue, 1 Feb 2011 07:49:50 +0000 (08:49 +0100)
committermartin f. krafft <madduck@madduck.net>
Thu, 7 Jul 2011 05:39:45 +0000 (07:39 +0200)
procmail/procmailrc
procmail/subject-cleaner [new file with mode: 0644]

index 69b3c702f427cc23dc0769c766620bd89d88e1a9..e5620b3acba2c2db25b8aea7f39b64617d940d16 100755 (executable)
@@ -49,6 +49,7 @@ INCLUDERC=$PMDIR/tickle
 INCLUDERC=$PMDIR/tnef-filter
 
 INCLUDERC=$PMDIR/listquirks
+INCLUDERC=$PMDIR/subject-cleaner
 
 INCLUDERC=$PMRULES/all
 
diff --git a/procmail/subject-cleaner b/procmail/subject-cleaner
new file mode 100644 (file)
index 0000000..2dd3387
--- /dev/null
@@ -0,0 +1,15 @@
+:0
+* SUBJECT ?? ^.+\[AntiVir checked\]$
+{ NEWSUBJECT="`echo $SUBJECT | sed -e 's,\[AntiVir checked\]$,,'`" }
+
+:0
+* NEWSUBJECT ?? .
+{
+  :0 fw
+  |$FORMAIL -I "Subject: $NEWSUBJECT"
+  SUBJECT="$NEWSUBJECT"
+  NEWSUBJECT
+}
+
+# vim:ft=procmail
+