2001-01-08-16:28:15 Philip Guenther:
Whoops, you just tried to use each message as an rcfile!
Whoops indeedie! Good catch. I routinely make that class of error, O
the embarrassment. Ok, revised it'd be
find renamed-maildir -type f|while read f;do procmail <$f;done
The other problem with the find command is that there can be
non-message files in the top maildir directory (the qmail pop
daemon uses a couple, I think).
Ok, if you're working with a varient on maildir format that adds
other non-message files, then make that a nice paranoid:
find renamed-maildir/{new,cur} -maxdepth 1 -type f | \
while read f;do procmail <$f; done
Instead, I would recommend a shell script, ala:
[...]
Different assumptions, different design:-). I move the input out of
the way by hand before re-filtering it, so I'm comfortable with a
design that doesn't attempt to defend against concurrent runs of the
same script against the same input. I just treat the maildir as a
folder, an opaque object, with the caveat that filtering through
procmail and back into the same folder could be "bad" in various
ways.
mv new "new.$suffix"
mv cur "cur.$suffix"
mkdir new old 2>/dev/null
^^^
cur?
-Bennett
pgpwChhA3MaJ9.pgp
Description: PGP signature