[exim] rewrite with ldap lookup

Top Page
Delete this message
Reply to this message
Author: Mike Stephens
Date:  
To: exim-users
Subject: [exim] rewrite with ldap lookup

Hi,

I have a problem when rewriting email addresses when pulling the email
address from an attribute which has multiple values. Is it possible to pull
out of $value only the entry I need. For example I get returned:

smtp:user@???, smtp:user@???, smtp:user@???

but I only want $value to be "user@???" matching on the "@???".

Currently I have the following lookup to pull back the proxyAddresses:

\N^(*?)\.(.*?)\.(.*)@company\.co\.uk "${lookup ldap \

{user=\"cn=userid,CN=Users,DC=company,DC=co,DC=uk\" \
                                pass=****** \
                                referrals=nofollow \


ldap:///dc=company,dc=co,dc=uk?proxyAddresses?sub?\

(&(objectClass=person)(proxyAddresses=smtp:$3.$2.$1))} \
                                {$value}}fail}"


With the above I get the error message:
               yielded unparseable address: missing or malformed local part
(expected word or "<")


Any help or pointers would be greatly appreciated.

Cheers

Mike
--
View this message in context: http://www.nabble.com/rewrite-with-ldap-lookup-tf3922970.html#a11124235
Sent from the Exim Users mailing list archive at Nabble.com.