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:

4574b18a60ae89adfbc77c3c6c16e30529c6cbe0
[etc/mailfilter.git] / procmail / logging
1 LOGABSTRACT=no
2
3 MSGIDDIR=$PMVAR/msgid
4
5 :0
6 * MSGID ?? ^<\/[^>]+
7 {
8   MSGID_NAME=`echo $MATCH | sha224sum | cut -d' ' -f1`
9
10   :0
11   * MSGID_NAME ?? ^\/.
12   { HASH1="$MATCH" }
13
14   :0
15   * MSGID_NAME ?? ^.\/.
16   { HASH2="$MATCH" }
17
18   THISLOGFILE_REL="${HASH1}/${HASH2}/${MSGID_NAME}_${OURDATE_SHORT}"
19   LOGDIR="${MSGIDDIR}/${HASH1}/${HASH2}"
20   MKDIR=`test -d $LOGDIR || mkdir -p $LOGDIR`
21   MKDIR
22   LOGDIR
23   THISLOGFILE="${MSGIDDIR}/${THISLOGFILE_REL}"
24   HASH2
25   HASH1
26   MSGID_NAME
27 }
28
29 MASTERLOGFILE="$LOGFILE"
30 LOGFILE="$THISLOGFILE"
31
32 LOG="==============================================================================$NL"
33
34 :0
35 * LOGLATER ?? .
36 { LOG="$LOGLATER" }
37
38 LOG="msgid:       $MSGID
39 logfile:     $THISLOGFILE_REL
40 date:        $DATE (@$OURDATE)
41 sender:      $SENDER
42 from:        $FROMEMAIL ($FROM)
43 original-to: $ORIGINAL_TO
44 subject:     $SUBJECT$NL"
45
46 TRAP="DESTFILE=\"\${LASTFOLDER#$BASE/}\";
47       /usr/bin/lockfile -4 -r50 -l180 $PMVAR/lock;
48       trap \"echo >> '$THISLOGFILE';
49              /bin/cat '$THISLOGFILE' >> $MASTERLOGFILE;
50              /bin/rm -f $PMVAR/lock\" 0"
51
52 THISLOGFILE_REL