++ 25/02/02 19:23 -0600 - Jerry O'Brien:
Help! I goofed on a systemwide procmail recipe and got a bunch of mail for
different users into one file. I thought I could re-deliver it with formail:
cat bigfile > formail -s procmail
and have everything split out and delivered. It doesn't deliver anything and
doesn't complian either. Am I on the right track here?
I use this bash script for this problem (it works here, no guarantee
it'll work for you):
| #!/bin/sh
|
| ORGMAIL=$1
|
| if cd $HOME &&
| test -s $ORGMAIL &&
| lockfile -r0 -l1024 .newmail.lock 2>/dev/null
| then
| trap "rm -f .newmail.lock" 1 2 3 13 15
| umask 077
| lockfile -l1024 -ml
| cat $ORGMAIL >>.newmail &&
| cat /dev/null >$ORGMAIL
| lockfile -mu
| formail -s procmail <.newmail &&
| rm -if .newmail
| rm -if .newmail.lock
| fi
| exit 0
To use it say "script bigfile".
-Rejo.
--
# rejo(_at_)sisterray(_dot_)xs4all(_dot_)nl, pgp: see headers,
http://www.xs4all.nl/~sister
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail