On 2014-02-11 at 08:52 -0800, Phil Pennock wrote:
> On 2014-02-11 at 12:16 +0000, Ritchie P. Fraser wrote:
> > Have I done something REALLY stupid like missed curly braces in the 
> > condition = statement?
> > 
> >                 I have tried the following:
> >                 condition     = ${if 
> > inlist{$sender_address_domain}{+our_sql_maildomains}{false}{true}}
> >                 condition     = ${if 
> > !inlist{$sender_address_domain}{+our_sql_maildomains}{true}{false}}
> >                 condition     = ${if 
> > !inlist{$sender_address_domain}{+our_sql_maildomains}}
> >                 !condition     = ${if 
> > inlist{$sender_address_domain}{+our_sql_maildomains}{true}{false}}
> >                 !condition     = ${if 
> > inlist{$sender_address_domain}{+our_sql_maildomains}}
> 
> inlist{FOO}{BAR} treats BAR as a list of simple strings; it doesn't take
> domainlists.  You want match_domain instead.
> 
>   condition = ${if 
> !match_domain{$sender_address_domain}{+our_sql_maildomains}}

Well that was rude of me, no matter how much of a hurry I was/am in.

No, that was not a stupid mistake -- this is a confusing area, with
multiple related functions; inlist/inlisti were added to provide safer
alternatives where the second parameter needs to be expanded but only a
simple list was wanted (which is normal, when expanding a variable to
provide the target list).

We could almost certainly use better documentation here; I'm far too
close to the problem domain and tend to miss when the docs I write have
subtleties that are not immediately obvious to someone not also familiar
with the issues.

So this *is* a bug, it's a documentation bug, and suggestions for
improved text, cross-referencing, etc are very welcome.

Regards,
-Phil

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to