procmail
[Top] [All Lists]

Re: formail question (-s and piping to tail)

2007-01-24 04:21:02
Gerald V. Livingston II schreef:

Can someone point out what's wrong with this?

formail <spambox -s formail -X X-Spam-Report: | tail -n +19 >>
spamreport2

The very first message from "spambox" gets piped through 'tail' so
that the first 18 lines (of useless info) of the X-Spam-Report:

My X-Spam-Report lines don't start with 18 lines of useless info.
http://www.xs4all.nl/~rvtol/.spamassassin/


header are chopped off before being appended to ./spamreport2. Every
subsequent message from the mbox does NOT get piped through tail and
gets the entire X-Spam-Report: header appended to ./spamreport2,
including the 18 lines of that header that I do not want.

Ideas??

Test 1:
  formail -s sed -n "/^X-Spam-Report/p"  <spambox

Test2:
  formail -s sed -n "/^X-Spam-Report/,/^[A-Z]/p"  <spambox

Then just replace the start and end regexen with the markers of
interest.

-- 
Groet, Ruud


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>