On Mon, 21 Apr 1997, Catherine Hampton wrote:
I'd like to be able to test for "From:|Reply-To:" and "^TO" being
identical -- I've noticed that's the case with many spams, and
I'd be cautious about testing for those two being the same, since I
still get mail from people who regularly Cc their own address. Maybe
you would want to test "From:|Reply-To:" aginst just the "To:" line.
Nevertheless, this ought to do what you wish: (untested) This should
match any occurence of the FROM address in any header line matched by
the ^TO token.
FROM=`formail -zrtxTo`
:0
* $^TO.*"$FROM"
action-line
David <dnhunt(_at_)rain(_dot_)org>