Re: [exim] How can a set up a ACL rule to filter on messages…

Etusivu
Poista viesti
Vastaa
Lähettäjä: John M Collins
Päiväys:  
Vastaanottaja: Ian Eiloart
Kopio: exim-users
Aihe: Re: [exim] How can a set up a ACL rule to filter on messagesubject?
On Mon, 2009-01-26 at 11:50 +0000, Ian Eiloart wrote:

>
> --On 25 January 2009 15:08:09 +0000 John M Collins <jmc@???> wrote:
>
> > Please CC me as I'm not subscribed - thanks.
> >
> > I should like to look up message subjects in a file of regexps of spam
> > message subjects like v[1i][a@]gr[a@]
> >
> > I've tried:
> >
> >
> > deny
> >    condition  = 
> ${lookup{"$h_subject"}nwildlsearch{CONFDIR/Bad-subject}{1}{0}}
> >    message    = Message subject line $h_subject looks like spam.\n\ 

>
> >        Please change subject and resend if not.

>
>
> This looks reasonable to me. I have an ACL condition like this:
>
>         condition = ${lookup{$local_part}lsearch{RT_DB}{true}{false}}

>
> Try removing the quotes around $h_subject.


Thanks but I started off without the quotes and put them in when that
gave the same error.

I put the quotes in because the manual said at section 11.5:


        If there is any white space in a lookup item which is part of a
        filter command, a retry or rewrite rule, a routing rule for the
        manualroute router, or any other place where white space is
        significant, the lookup item must be enclosed in double quotes.
        The use of data lookups in users’ filter files may be locked out
        by the system administrator.



I thought that might have been the problem.


> >
> > But I get the error message
> >
> >
> > ... temporarily rejected after DATA: failed to expand ACL string
> > "${lookup{"$h_subject"} nwildlsearch{/etc/exim4/Bad-subject}{1}{0}}":
> > missing lookup type
> >
> >
> > Maybe I don't need {1}{0} but it doesn't seem to make any difference.
> >
> > Please could someone explain where this is going wrong - I've tried
> > "lsearch" temporarily but I still get the same error.
> >
> >
> > John Collins Xi Software Ltd www.xisl.com
>
>



John Collins Xi Software Ltd www.xisl.com