On Mon, 25 Aug 1997 22:39:19 -0700, Tim <bodysurf(_at_)pobox(_dot_)com> wrote:
FROM=`formail -rtzc -x'To:'`
:0
* FROM ?? ? grep -v ".*[^0-9].*@"
You could at least use the built-in regexp matching instead of relying
on an external call to grep.
* ! FROM ?? [^0-9].*@
The leading wildcard is not necessary in grep, either. I'd probably
change that ".*" to something less allowing -- if I understand the
original question correctly, that should be an all-numeric localpart,
anyway, so you could instead say
* FROM ?? ^^[0-9]+@
In practice, I think I'd want to filter anything which has an 8-digit
localpart in +either+ of From_, From:, Reply-to:, or even To:, instead
of only looking at whatever address formail returns.
These headers are apparently generated by a program so you could be
fairly confident that they will be rather uniform, and not contain
surprises such as the sender's full name or comments.
Hope this helps,
/* era */
--
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r. <http://www.iki.fi/~era/>
* Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>