On 25/08/13 19:07, Phil Pennock wrote:
On 2013-08-24 at 18:21 +0100, Rowland Penny wrote:
You would get:

[email protected] [email protected] [email protected]

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 [email protected], you would get returned
[email protected] not [email protected] [email protected] [email protected]

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
Hi Phil, thanks very much for your reply, I just need to get my head round the differences between postfix & Exim now ;-)

Rowland


--
## 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