Re: [Exim] extract, address_data and ldap!

Top Page
Delete this message
Reply to this message
Author: Adam Cassar
Date:  
To: exim-users
Subject: Re: [Exim] extract, address_data and ldap!
For the record, I ended up just using extract on fields that are present
on that particular objectClass. Works like a charm.

On Thu, 2002-09-12 at 14:24, Adam Cassar wrote:
> Hi Guys,
>
> I am hoping someone can help me with a sticky configuration.
>
> I am doing an ldap query and sticking it in address_data like so:
>
> address_data = ${lookup
> ldap{ldap:///uid=${quote_ldap:${local_part}}@${quote_ldap:${domain}},cn=${quote_ldap:${domain}},ou=webmail,dc=test,dc=com?base}{$value}{fail}
>
> which returns me something like:
>
> objectClass="top, inetLocalMailRecipient, posixAccount, person"
> cn="pump" uid="pump@???" mail="pump@???"
> mailLocalAddress="pump@???" userPassword="pump" uidNumber="10000"
> gidNumber="10000" homeDirectory="/webmail/mail/t/e/test.com/pump/"
> mailQuota="1000M"
>
> Now what I want to do is use extract to get the data from the
> objectClass field. However you will notice
>
> objectClass="top, inetLocalMailRecipient, posixAccount, person"
>
> But I want to check for ${extract{objectClass}{objectClass="top,
> inetLocalMailRecipient, posixAccount, person"}}
>
> Which obviously won't work. So I tried using ${sr to change ', ' to be
> 'objectClass=' so it ends up with multiple objectClass= variables.
> However as there are multiple entries it always returns the first one -
> but I want to check for the existence of lets say objectClass=person.
>
> Any ideas?
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>