: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"
Shouldn't you use something like:
^Received:[ ].*[ ]for([ ]|[ ]\<)\/(x\.com|y\.com|z\.com)
You're right about catching whitespace before the address. I would
have
also caught fred(_at_)tv(_dot_)com, not just ed(_at_)tv(_dot_)com(_dot_)
I might rewrite it this way, then:
(^TO|^Received:.*for
<?)\/(ed(_at_)tv\(_dot_)com|joe(_at_)aol\(_dot_)com|hey(_at_)whats\(_dot_)happening\(_dot_)com)
The regex that you provided isn't going to match whitespace that
isn't
a space (i.e. tabs, like the one before 'for') or if whitespace is
missing
after Received:, and it also won't catch addresses that are enclosed
in
angle brackets
I tried to mean space and tab by [ ].
I've never seen whitespace missing after the initial colon in a
header.
I thought \< was allowed inside (|), it might not be necessary.
I still think you should put in a few [ ^I].
Ruud