From: John Summerfield <summer(_at_)OS2(_dot_)ami(_dot_)com(_dot_)au>
Just wondered if it's possible to extract two lines such as
Subject and X-Mailer... I tried but didn't find a way of
I'd use egrep;
egrep -i '^X-Mailer:|^Subject:' <mailbox
The formail solution offered works fine - as a later
post showed, you can add other headers to hit on easily.
Your method is liable to hit a false positive pretty
Subject: RE: blah
I just wrote you a message that had the following
Subject: blah. Did you get it? It also had
X-Mailer: blah in it. I sure hope you got it!
Your egrep would count two Subject: hits and two X-Mailer:
hits. formail, otoh, would get it right. It knows that
a new mail message has not started.
\ .-. .-. .-. .-. .-. .-. .-. /
'-' '-' '-' '-' '-' '-' '-' '-'
procmail mailing list