Moin,
* David Haller
==== resort-plonked.sh [UNGETESTET!] ==== MBOX="/home/ratti/plonk" LOCKFILE="/home/ratti/plonk.lock"
trap "release_lock; exit 2;" 1 2 3 4 6 7 8 10 11 12 13 14 15 17
acquire_lock() { test -e "$LOCKFILE" && exit 37 echo $$ > "$LOCKFILE" }
release_lock() { if test -r "$LOCKFILE" && test `cat "$LOCKFILE"` -eq $$ then rm -f "$LOCKFILE" else exit 1 fi }
acquire_lock
if cp "$MBOX" "${MBOX}.work" then
"$MBOX" else release_lock test -f "${MBOX}.work" && rm -f "${MBOX}.work" exit 1 fi
release_lock
if cat "${MBOX}.work" | procmail then rm -f "${MBOX}.work" fi ====
==== ~/.procmailrc ==== :0 H * ^X-Plonked-Seen: ratti@localhost inbox
:0 H: /home/ratti/plonk.lock * ? (formail -x From: -x Sender: -x Reply-To: -x Received: | fgrep -iqf $PLONK) { :0 fw | formail -i "X-Plonked-Seen: ratti@localhost"
:0 /home/ratti/plonk } ====
Ok, um an die Diskussion anzuknüpfen, die Du leider nicht fortgesetzt hast: Warum nochmal benutzen alle Procmail? Das ist eine Art Quiz, oder? Wer die unleserlichtste Regel erstellt, bekommt einen Preis? Thorsten -- Don't let your sense of morals prevent you from doing what is right. - Isaac Asimov