]> 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 flagging of test messages
authormartin f. krafft <madduck@madduck.net>
Sun, 23 Sep 2007 16:32:54 +0000 (18:32 +0200)
committermartin f. krafft <madduck@madduck.net>
Sun, 23 Sep 2007 16:32:54 +0000 (18:32 +0200)
config/skip-spamchecks
config/test-messages [new file with mode: 0644]
procmail/flag-test-messages [new file with mode: 0644]
procmail/procmailrc
procmail/spool
procmail/to-gmail

index 773aeda49744bca2939afd06c95773d7eb13c41c..d96855aeecbf6553c02d3045bb83f7ae2557abff 100644 (file)
@@ -1,6 +1,4 @@
-^X-Mailer: swaks v20[[:digit:].]+(-dev)? jetmore\.org/john/code/#swaks$
 ^User-Agent: rss2email$
 ^User-Agent: rss2email$
-^X-madduck-test: yes$
 ^X-Original-To: [[:digit:]]+@tickle\.madduck\.net$
 ^To:.*\<ebay\.com@pobox\.madduck\.net\>
 ^To:.*\<paypal\.com-(us|de)@pobox\.madduck\.net\>
 ^X-Original-To: [[:digit:]]+@tickle\.madduck\.net$
 ^To:.*\<ebay\.com@pobox\.madduck\.net\>
 ^To:.*\<paypal\.com-(us|de)@pobox\.madduck\.net\>
diff --git a/config/test-messages b/config/test-messages
new file mode 100644 (file)
index 0000000..caaf049
--- /dev/null
@@ -0,0 +1,2 @@
+^X-Mailer: swaks v20[[:digit:].]+(-dev)? jetmore\.org/john/code/#swaks$
+^X-madduck-test: yes$
diff --git a/procmail/flag-test-messages b/procmail/flag-test-messages
new file mode 100644 (file)
index 0000000..a247504
--- /dev/null
@@ -0,0 +1,8 @@
+:0 BH
+* ? $EGREP -qif $CONF/test-messages
+{
+  LOG="flag-test:   flagging test message $MSGID$NL"
+  MSG_TEST=match
+  SPAM_UNKNOWN=test-message
+  SKIP_SPAMCHECKS=test-message
+}
index b72cc4edc411d03c8980d7ddd91077ae208bcbb4..6afe20cd7a5b1a50c368d36c50ffcb235beb97a9 100755 (executable)
@@ -19,6 +19,8 @@ INCLUDERC=$PMDIR/smsmail
 INCLUDERC=$PMDIR/logging
 INCLUDERC=$PMDIR/msgid-index
 
 INCLUDERC=$PMDIR/logging
 INCLUDERC=$PMDIR/msgid-index
 
+INCLUDERC=$PMDIR/flag-test-messages
+
 INCLUDERC=$PMDIR/dejavu
 INCLUDERC=$PMDIR/cleanup
 INCLUDERC=$PMDIR/eqdomains
 INCLUDERC=$PMDIR/dejavu
 INCLUDERC=$PMDIR/cleanup
 INCLUDERC=$PMDIR/eqdomains
index 61a7321b93a08e629ce8e97f575808cb15536892..b7e5108f8c26aff626d34237d9ed882d0bc6d78d 100644 (file)
@@ -1,5 +1,6 @@
 :0 c
 *$ ! $MSG_DEJAVU
 :0 c
 *$ ! $MSG_DEJAVU
+* ! MSG_TEST ?? .
 {
   LOG="spool:       saving message $MSGID to spool$NL"
   TRAP
 {
   LOG="spool:       saving message $MSGID to spool$NL"
   TRAP
@@ -8,6 +9,11 @@
 }
 
 :0 E
 }
 
 :0 E
+* MSG_TEST ?? .
+{ LOG="spool:       not saving test message to spool$NL" }
+
+:0 E
+*$ $MSG_DEJAVU
 { LOG="spool:       not saving resubmitted message to spool$NL" }
 
 # vim:ft=procmail
 { LOG="spool:       not saving resubmitted message to spool$NL" }
 
 # vim:ft=procmail
index 21ab43eceac45ae5a4eb3c492cefe8b337a896eb..e73c8f1b2c447de4da9581b7449870e5877ca00b 100644 (file)
@@ -1,9 +1,9 @@
 :0
 * ORIG_DOMAIN ?? ^(mass|r2e)\.madduck\.net$
 :0
 * ORIG_DOMAIN ?? ^(mass|r2e)\.madduck\.net$
-* !^X-Mailer: swaks
 {
   :0 c
   *$ ! $MSG_DEJAVU
 {
   :0 c
   *$ ! $MSG_DEJAVU
+  * ! MSG_TEST ?? .
   {
     LOG="gmail:       archiving message $MSGID with gmail$NL"
     SENDMAILFLAGS="$SENDMAILFLAGS -f $ID"
   {
     LOG="gmail:       archiving message $MSGID with gmail$NL"
     SENDMAILFLAGS="$SENDMAILFLAGS -f $ID"
   }
 
   :0 E
   }
 
   :0 E
+  * MSG_TEST ?? .
+  { LOG="gmail:       not archiving message test message with gmail$NL" }
+
+  :0 E
+  *$ $MSG_DEJAVU
   { LOG="gmail:       not archiving message resubmitted message with gmail$NL" }
 }
   { LOG="gmail:       not archiving message resubmitted message with gmail$NL" }
 }