procmail
[Top] [All Lists]

Re: question about a recipe

1998-11-21 16:13:02
On Sat, 21 Nov 1998 12:47:51 -0800 (PST),
Peter Jay Salzman <psalzman(_at_)landau(_dot_)ucdavis(_dot_)edu> wrote:
this line in my rc.spam file:
    * ((^Subject.*spam error) || (^From.*landau) || (^From.*physics))

Are you sure you transcribed this correctly? This will match every
message in existence; a||b matches a or empty string or b. You
probably mean

    * ^Subject:.*spam error|^From.*(landau|physics)

i guess i can sort of see why--the 3rd line in the header (although i
thought matching was case sensitive).   i need to receive email from

It is not, unless you specify a D flag.

landau.ucdavis.edu and physics.ucdavis.edu which will not have my name on
it.  these letters must go into $DEFAULT.
can someone think of a way to match letters which specifically come from
these two hosts without having the Received: header trip a match?

Given that the above recipe doesn't match on Received: lines, I don't
see what the problem is. If the recipe you gave is actually supposed
to pass through anything it matches, it should be doing its job
already. 

Anyhow, one way to say "landau anything, except on a Received: line"
is this:

    :0
    * landau
    * ! ^Receoved: .* by landau
    .... 

This is not good enough in the general case, but should do what you
want, if the above comments didn't already get you there. (In the
general case, you want to count the number of occurrences of landau,
subtract all that are on Received: lines, and see if you are left with
a positive number. See the procmailsc(5) manual page for hints.)

Hope this helps,

/* era */

-- 
.obBotBait: It shouldn't even matter whether    <http://www.iki.fi/~era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>

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