procmail
[Top] [All Lists]

Re: to = """

2000-01-06 23:07:09
Jonathan Pennington <jwp(_at_)awod(_dot_)com> writes:
* On Thu, 6 Jan 2000 15:18:43 +0200, "Jakob Solomon" 
<jakob(_at_)finjan(_dot_)com>
wrote:
How do write a script
which will send to /dev/null all e-mail
which have an empty 'To:' field   ?

Couldn't that be done:

:0
* To??^$
/dev/null

That would filter no To: line, wouldn't it. I get that spam a lot. 

The above recipe tests the 'To' variable to see if it contains nothing or
an empty line.  You must set 'To' to the right value before this recipe.
Depending on how you do that, the above might not work: what if the
header contains a To: header with only whitespace, or a wrapped To:
line with nothing on the first line?  Those probably won't be handled
correctly by the above recipe.


Philip Guenther

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