| Now, what follows -s?
| I tried
| format -s cat > '$FILENO' < inbox
Normally you wouldn't put cat there, since formail -s > output does the same
without invoking cat. (But that's something known only to procmail people,
not to all shell users, so it doesn't deserve a UUCA.)
| AND
| format -s cat > $FILENO < inbox
| I got a file called $FILENO with the same
| contents (one file with all the messages).
OK, here goes. Depending on the structure of the inbox, you might need
formail's -e, -d, or -m options, but -s has to be last on the command line
before the name of the command to feed the messages to:
FILENO=1 formail -s sh -c 'cat > $FILENO' < inbox
Although it calls two processes for each message (sh and cat) instead of just
one (procmail) as this method does,
FILENO=1 formail -s procmail -pm DEFAULT='$FILENO' /dev/null < inbox
the first way runs faster because procmail does a lot of sanity checks and
also locks the destination files. You could create a small procmailrc file
containing the following:
MAILDIR=whichever_directory
:0
$FILENO
and do this on the command line:
FILENO=1 formail -s procmail -pm that_rc_file < inbox
to avoid the locking, but the speedup is not great.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail