On 18 May 2005, at 07:50 , Claus Atzenbeck wrote:
formail +1 -z -cx From: -cx Subject: -s sed '1,1s/["\\]//g; 2,2s/^/-
> /; $G' < /var/mail/claus
That's pretty nifty.
However, I want to filter those mails and have only read mail
appearing
in that list. The regexp would look like this:
just add a -cx Status to your formail portion and then a grep -v -B2 -
e 'Status:.*R'
something like this:
formail +1 -z -cx From: -cX Status: -cx Subject: -s sed '1,1s/["\\]//
g; 2,2s/^/-> /; $G' < /var/mail/claus | egrep -v -B3 'Status:.*R'
hmm...
that seems like it SHOULD work. However, it seems to still be
showing messages that are marked as read.
seems that -B2 and -v don't get along.
formail +1 -z -cx From: -cX Status: -cx Subject: -s sed '1,1s/["\\]//
g; 2,2s/^/-> /; $G' < /var/mail/claus | egrep -B3 "Status: O"
works, but is not what you wanted. As soon as I throw a -v in there
it stops working
perhaps my grep is old:
% grep -V
grep (GNU grep) 2.4d
--
I listen to the wind, to the wind of my soul
____________________________________________________________
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