> grep -B1 "by xanadu\.evi\-inc\.com \(8\.12\.8\/8\.12\.8\) with"
> mailbox.mbx
>
> Which gets me output like this:
> Received: from mkettler-xpmain.evi-inc.com (tcp-6-249.evi-inc.com
> [10.0.6.249])
> by xanadu.evi-inc.com (8.12.8/8.12.8) with ESMTP id
> i41FURox001922;
>
> If I re-grep the output for Received:, I'll just get the line of interest:
>
> grep -B1 "by xanadu\.evi\-inc\.com \(8\.12\.8\/8\.12\.8\) with"
> mailbox.mbx
> | grep Received\:
>
> Received: from mkettler-xpmain.evi-inc.com (tcp-6-249.evi-inc.com
> [10.0.6.249])
Another option, although I don't know how familiar the original poster
is with perl, is to check out Mail::Field and Mail::Field::Received,
which will do a lot of the dirty work for you. :)
Benny
--
"Oh, the Jedis are going to feel this one!" -- Professor Farnsworth,
"Futurama"