On Mon, Mar 22, 2004 at 04:00:31PM +0000, Tim Jackson wrote:
> Hi Bruce, on Mon, 22 Mar 2004 15:30:10 +0000 you wrote:
>
> > Some of the things I have been trying to do with Exim recently would
> > have been significantly eaiser if it were possible to test for list
> > membership in string expansions, along the lines of
> > {if inlist{$value}{+relay_domains}{yes}{no}}
>
> This came up recently. The Exim WishList has this:
>
> "
> (73) 17-Jul-02 M Match a list from within a condition
>
> e.g. ${if matchdomain {$domain}{+domainlist} ...
> ${if matchhost {$sender_host_address}{1.2.3.4/10:2.3.4.5/16}...
>
> Thought needed about how to handle host names. This may be too messy to
> specify cleanly.
> "
>
> However, FWIW, I must say that it would be an *extremely* useful feature
> if Philip could find the time to add it. Even just support for named lists
> would be a great start.
Agreed. I can see how it could be awkward to marry the named list
logic with string expansions, though. I suppose one alternative method
would be to allow string expansion on the left hand side of acl
conditions and router settings in certain circumstances. E.g:
deny message = You can't do that!
host ${expansion} = !+relay_hosts
warn message = X-Spam-Score: $spam_score ($spam_bar)
domain ${expansion} = +relay_domains
spam = nobody:true
--
Bruce
Hummingbirds are the only birds that can fly backwards, apart from
ostriches if you punch them hard enough.