]> 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:

proper handling of X-Postponed header
authormartin f. krafft <madduck@madduck.net>
Sun, 2 Mar 2008 15:44:40 +0000 (16:44 +0100)
committermartin f. krafft <madduck@madduck.net>
Sun, 2 Mar 2008 15:44:40 +0000 (16:44 +0100)
procmail/addheaders
procmail/defines
procmail/delay-delivery
procmail/tickle

index cbfc9ed6a3069b5edd2e391e0b6fb268fa32954d..6d739c119a5605a67905da40aff6605a15bada99 100644 (file)
@@ -14,4 +14,8 @@
 * EQ_DOMAIN ?? .
 |$FORMAIL -A"X-EqDomain: $ORIG_DOMAIN" -A"X-EqTo: $EQ_LOCAL@$EQ_DOMAIN"
 
+:0 fw
+* POSTPONED ?? .
+|$FORMAIL -I"X-Postponed: $POSTPONED"
+
 # vim:ft=procmail
index 17b3d3cfd61fe9b4bcc929363b9c8238fd24eb1e..dc9663a22014f3c103f9a0c9ded08a573316fe7b 100644 (file)
@@ -157,7 +157,7 @@ INCLUDERC=$PMDIR/get-msgid
 
 :0
 *$ ^X-Postponed:$RE_EXTRACT_HEADER_VALUE
-{ DELAYED="$MATCH" }
+{ POSTPONED="$MATCH" }
 
 # fix variable values for special cases
 INCLUDERC=$PMDIR/normalise
index 9b795343cf9283ea54d3376ba47bd53c4aeb620b..cfe3403fad23061460a6b48d55141d6674593f18 100644 (file)
@@ -1,9 +1,12 @@
 #TODO: create config/delay-(disabled|tonight|weekend)
 
-:0
+:0 fw
+* POSTPONED ?? .
+|$FORMAIL -R X-Postponed X-Was-Postponed
+
+:0 E
 * ! DISABLE_DELAYS ?? .
 * DELAY ?? .
-* ! DELAYED ?? .
 {
   #TODO: for tickling, use header date
   RELEASE="`$BIN_DATE -d \"$DELAY\" +'%s %c'`"
@@ -21,9 +24,7 @@
     { RELEASE_TIME="$MATCH" }
 
     LOG="delay:       delay delivery of $MSGID until $RELEASE_TIME$NL"
-
-    :0 fw
-    |$FORMAIL -I "X-Postponed: $RELEASE_TS ($RELEASE_TIME)"
+    POSTPONED="$RELEASE_TS ($RELEASE_TIME)"
 
     INCLUDERC=$PMDIR/record-delayed-mail
 
index 65578489063b6d0fe28542b57ab87eedebf93826..6b0276a70cd045d7c4ed4e4ca5a83c8e7a745e6d 100644 (file)
@@ -1,9 +1,14 @@
 # The X-Tickle header has priority over the Original-To address
 :0
 *$ ^X-Tickle:${RE_SPACE}+\/${RE_NOT_SPACE}+
-{ TICKLE="$MATCH" }
+{ 
+  TICKLE="$MATCH"
+  :0 fw
+  |$FORMAIL -IX-Tickle
+}
 
 :0 E
+* ! POSTPONED ?? .
 * ORIGINAL_TO ?? ^.+@tickle\.madduck\.net$
 * ORIGINAL_TO ?? ^\/[^@]+
 { TICKLE="$MATCH" }