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

generate (or use resent-)message-id if missing
authormartin f. krafft <madduck@madduck.net>
Mon, 27 Aug 2007 09:11:26 +0000 (11:11 +0200)
committermartin f. krafft <madduck@madduck.net>
Mon, 27 Aug 2007 09:11:26 +0000 (11:11 +0200)
procmail/get-msgid

index 3639f51e8cd599a3e80de7d8656ed4103cada3cc..c1260ac8bd9a5639ac573c05e6ff9a3e2e40e90b 100644 (file)
@@ -5,15 +5,24 @@
 :0
 * MSGID ?? ^[  ]*$|^<>$
 {
-  TMPFILE="`tempfile -p msgid`"
-  LOG="get-msgid:   LACKING MSGID header, DUMPING to $TMPFILE (@$OURDATE)$NL"
+  :0
+  * ^Resent-Message-Id:[       ]*\/[^  ]+
+  {
+    LOG="get-msgid:   lacking message-id, using resent-message-id...$NL"
+    :0 fw
+    |$FORMAIL -R Resent-Message-Id Message-Id
+  }
 
-  :0 ifw
-  |cat > $TMPFILE
+  :0 E
+  {
+    LOG="get-msgid:   lacking message-id, generating one...$NL"
+    :0 fw
+    |$FORMAIL -a Message-ID:
+  }
 
-  EX_DEFER=75
-  EXITCODE=$EX_DEFER
-  HOST
+  :0
+  * ^Message-Id:[      ]*\/[^  ]+
+  { MSGID="$MATCH" }
 }
 
 :0