X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/aec372bfa7868012eb29f5d6d7349e3de8924143..da55607c50fd58a4652415ae460216bc0e5c3b8e:/procmail/logging 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 }