procmail
[Top] [All Lists]

Re: matching and showing only a part

1999-09-28 09:17:51
I would like to check the To & Cc headers (plus resents) and see
what address is listed.  If none is listed in either to or cc, then
I would like to check the Received: headers.

   :0 fhw
   * 
^TO\/(ed(_at_)tv\(_dot_)com|joe(_at_)aol\(_dot_)com|hey(_at_)whats\(_dot_)happening\(_dot_)com)
   | formail -A "X-Sent-To-Me-At: $MATCH"

Was thinking about it a few minutes ago and realized that I forgot to
add the Received: header check.  I could claim that it was left as an
exercise for the reader...

   :0 fhw
   * 
(^TO|^Received:.*)\/(ed(_at_)tv\(_dot_)com|joe(_at_)aol\(_dot_)com|hey(_at_)whats\(_dot_)happening\(_dot_)com)
   | formail -A "X-Sent-To-Me-At: $MATCH"

This should also check the Received header.

Chris

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