Re: [Exim] Lookup Syntax Help

Top Pagina
Delete this message
Reply to this message
Auteur: dman
Datum:  
Aan: exim-users
Onderwerp: Re: [Exim] Lookup Syntax Help
On Sun, Dec 23, 2001 at 01:39:02PM -0800, Marc Perkel wrote:
| --- In exim-users@y..., Philip Hazel <ph10@c...> wrote:
| > On Fri, 30 Nov 2001, Marc Perkel wrote:
| >
| > > OK - I'm confused about how to do the syntax on this.
| > > I want to do an if conditional in a filter where I want to
| > > determine if "string" is in a file that contains a list of
| > > prohibited email address - like this:
| > >
| > > savebig@*
| > > joe@???
| > >
| > > How do I write that conditional?
| >
| > if ${lookup{string}lsearch{/the/file}{yes}{no}} is yes then ...

|
| I thied that and it doesn't work - anyone know how to do this?


It does work. I pieced it together from the docs last night. I
suggest that you read section 6 of the manual (the main manual, not
the filter one). It explains what 'lsearch' is. It is not equivalent
to "fgrep". (you can do that with procmail if you want, though) Test
it with the "joe@???" address. Oh, yeah, for "string" use

    ${local_part:$header_From:}@${domain:$header_From:}


HTH,
-D

--

He who finds a wife finds what is good
and receives favor from the Lord.
        Proverbs 18:22