From: martin f. krafft Date: Tue, 20 Nov 2007 22:07:25 +0000 (+0100) Subject: implement locking for logging X-Git-Url: https://git.madduck.net/etc/mailfilter.git/commitdiff_plain/4f7fed650f35de2eada637d565f5e7d1c611d8c5 implement locking for logging --- diff --git a/procmail/logging b/procmail/logging index 842cd9a..1fc2c7d 100644 --- a/procmail/logging +++ b/procmail/logging @@ -21,7 +21,9 @@ original-to: $ORIGINAL_TO subject: $SUBJECT$NL" TRAP="DESTFILE=\"\${LASTFOLDER#$BASE/}\"; + /usr/bin/lockfile -4 -r5 -l180 $PMVAR/lock; trap \"echo >> '$THISLOGFILE'; - cat '$THISLOGFILE' >> $MASTERLOGFILE\" 0" + /bin/cat '$THISLOGFILE' >> $MASTERLOGFILE; + /bin/rm -f $PMVAR/lock\" 0" #VERBOSE=yes