Re: [exim] lists & string expansions

Góra strony
Delete this message
Reply to this message
Autor: Oleg
Data:  
Dla: exim-users
Temat: Re: [exim] lists & string expansions
On Wed, Jul 02, 2014 at 02:34:36PM -0400, Phil Pennock wrote:
> On 2014-07-02 at 17:15 +0400, Oleg wrote:
> > I use macros LOCALDOMAIN because a domains list isn't expanded. E.g.:
> >
> >   deny  message = You must authenticate youself before using this domain
> >         condition = ${if inlist{$sender_address_domain}{+local_domains}}
> >         ! authenticated = *

> >
> > doesn't work.
> >
> > Do anybody know how use lists in string expansions?
>
> condition = ${if match_domain{$sender_address_domain}{+local_domains}}


Wow. Thank you! This works. This is what i need.

> The match_domain condition takes an arbitrary specification in the
> second parameter; however, because too many real-world setups introduced
> security holes using this, we restricted it so that the second parameter
> is not subject to dollar-expansion. Every other type of lookup still
> works.


May be i can find anywhere an info or examples of such configs with
security holes to know how not to do?

> If you need to dollar expand the second parameter, you use inlisti or
> some other more complex condition; if you don't need to dollar-expand
> it, then the common case match_* conditions provide the most power and
> flexibility.


Thank you for the explanation!