Re: [Exim] filter rule precedence

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Vadim Vygonets
CC: exim-users
Subject: Re: [Exim] filter rule precedence
On Sun, 2 Feb 2003, Vadim Vygonets wrote:

> Quoth Rob Lingelbach on Fri, Jan 31, 2003:
> > I'm a little confused about the precedence of a filter rule I'm
> > trying to implement. I need messages addressed to 'tig-announce'
> > to be discarded unless they are explicitly from either of two
> > users, 'dlt' or 'rob@emsh'. This is what I wrote, and in the system
> > filter file it seemingly discards all mail:
> >
> > if $local_part contains "tig-announce" and
> >    $header_from does not contain "rob@emsh" or
>                                               ^^
>                                               ^^
> "and".

>
> >    $header_from does not contain "dlt"
> > then
> >    seen finish
> > endif

>
> I would also avoid using "contain" for this. Especially on the
> first line, where I would use "is" instead.


Just what I was going to say!

However, this is really a routing issue, not a filtering issue. What do
you want to do if a message is addressed to BOTH 'tig-announce' AND
some other address? Your filter will discard it. I would use a router:

discard:
driver = redirect
senders = dlt@... : rob@emsh
local_parts = tig-announce
domains = ....
data = :blackhole:

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.