Re: [exim] Exim and multi-value attributes

Pàgina inicial
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
A: Rowland Penny
CC: exim-users
Assumpte: Re: [exim] Exim and multi-value attributes
On 2013-08-24 at 18:21 +0100, Rowland Penny wrote:
> You would get:
>
> user@??? user@??? user@???
>
> So, you cannot do this with postfix, but can exim trim this list down to
> one mail address based on the domain part of the initial search address
>
> i.e. if you search for mailgroup@???, you would get returned
> user@??? not user@??? user@??? user@???
>
> A simple yes or no answer will do, if yes, I will install Exim and start
> reading the documentation


Yes. The documentation is large, what follows should give you guidance.

String expansion language. The original domain of the recipient will
always be in $original_domain, even as you redirect and $domain changes.

There are map/reduce/forany/forall expansion operators.

Note that Exim 4.80 changed how multi-value attributes are returned:
they're now a comma-separated list, with original commas doubled.

So let's say you define a macro LDAP_GET_RECIPIENTS which does all the
LDAP magic; you might use:

${filter{<, LDAP_GET_RECIPIENTS}{eqi{${domain:$item}}{$original_domain}}}

Untested, but that's the general gist.

There are probably easier and more concise methods known to folks here
who actually use LDAP in production. ;)

-Phil