Jim Osborn <jimo(_at_)eskimo(_dot_)com> wrote:
Maybe the heat has melted my brain, but I can't seem to get formail
to perform a series of commands on each mail that it's split from
a folder. Here's an example of a simple debugging attempt:
formail -s addr=`formail -X From: | formail -r | formail -zx To`;\
echo "$addr" >>output
If you insist on doing it from the command line, this would have
been the syntax for the construction you attempted:
echo `formail -s sh -c 'formail -X From: | formail -r | formail -zx To:' `
FWIW, the goal of this little effort is to extract the From: address
from a SmartList envelope and send each such address a form note.
formail -s formail -X From:
However, if it's this functionality you're looking for (and you are certain
that the mails are coming from a well-behaved mailinglist (like SmartList)),
then we can do it all in one:
echo `formail -IResent- -t -r -z -x To: -s `
or
echo `formail -IResent- -trzx To: -s `
for short.
--
Sincerely,
srb(_at_)cuci(_dot_)nl
Stephen R. van den Berg (AKA BuGless).
Father's Day Special at the local clinic -- Vasectomy!