From da55607c50fd58a4652415ae460216bc0e5c3b8e Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 31 Aug 2009 12:37:06 +0200 Subject: [PATCH 1/1] use hashed directory for msgid dir --- procmail/logging | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/procmail/logging b/procmail/logging index 9f1efd0..b5de200 100644 --- a/procmail/logging +++ b/procmail/logging @@ -7,9 +7,29 @@ MSGIDDIR=$PMVAR/msgid { MSGID_NAME=`echo $MATCH | sha224sum | cut -d' ' -f1` + :0 + * MSGID_NAME ?? ^\/. + { HASH1="$MATCH" } + + :0 + * MSGID_NAME ?? ^.\/. + { HASH2="$MATCH" } + THISLOGFILE_REL=${MSGID_NAME}_${OURDATE_SHORT} - THISLOGFILE="${MSGIDDIR}/${THISLOGFILE_REL}" + LOGDIR="${MSGIDDIR}/${HASH1}/${HASH2}" + + VERBOSE=yes + + MKDIR=`test -d $LOGDIR || mkdir -p $LOGDIR` + MKDIR + + THISLOGFILE="${LOGDIR}/${THISLOGFILE_REL}" + + VERBOSE=no + LOGDIR + HASH2 + HASH1 MSGID_NAME } -- 2.39.5