Re: [exim] Exim 4.80 RC4 uploaded

Top Page
Delete this message
Reply to this message
Author: Jeremy Harris
Date:  
To: exim-users
Subject: Re: [exim] Exim 4.80 RC4 uploaded
On 2012-05-22 16:15, Christopher Bodenstein wrote:
> QUOTAFILEVAL = ${extract {3} {","} { ALLQUOTA }}


Yes (as you found out). An explanation for anyone
listening who hasn't followed the problem in depth:

The return from an ldap lookup can not only be a
set of attributes (as a key=value sequence,
parseable using ${extract } ) - but also each value
can potentially be multiple, comma-separated.

Because any element of a (potentially) multiple
value might itself contain a comma, we need to
distinguish between the comma used to separate
multiple elements and a "real" comma. So we double
the "real" comma and require that the user deals
with both parts of the parsing explicitly:

1) Pull apart the set of attributes for the value of the one
you want. Use ${extract }, usually.

2) Pull apart the comma-separated list of multiple
elements of the attribute. Exactly how you do this
depends on what you're doing; a ${filter } or forall{}{}
or inlist{}{} might be usable. The list functions here deal
with both splitting on the list-separator and
collapsing the duplicates that signal "not-a-separator".

2a) If you *know* from your LDAP schema definition
that an attribute is always single-valued then you
can use sg{$var}{,,}{,} to collapse duplicates.

2b) If you *know* that your LDAP attributes both are
single-valued and never contain comma, you can just
ignore the whole issue.


Clear as mud, really!
--
Jeremy