Change the GAL External LDAP mappings?

Ask questions about your setup or get help installing ZCS server (ZD section below).
bmiddleton
Posts: 5
Joined: Fri Sep 12, 2014 9:58 pm

Change the GAL External LDAP mappings?

Postby bmiddleton » Sun Oct 23, 2005 10:17 am

Is it possible to change the generic attribute mappings when using an external LDAP services that provides GAL for a domain? Is there a configuration file that I could modify which objects Zimbra pulls from an external LDAP source?


My issue is Zimbra (based on the Zimbra documentation) is mapping the LDAP object "postalAddress" to Zimbra object "workStreet". This seems to be wrong based on rfc2252, rfc2798, and rfc2256. This could be a showstopper of a lot of the universities and companies that have bulit there LDAP directory based on the rfc's.

http://www.faqs.org/rfcs/rfc2252.html

********************************************************

6.27. Postal Address

( 1.3.6.1.4.1.1466.115.121.1.41 DESC 'Postal Address' )

Values in this syntax are encoded according to the following BNF:

postal-address = dstring *( "$" dstring )

In the above, each dstring component of a postal address value is

encoded as a value of type Directory String syntax. Backslashes and

dollar characters, if they occur in the component, are quoted as

described in section 4.3. Many servers limit the postal address to

six lines of up to thirty characters.

Example:

1234 Main St.$Anytown, CA 12345$USA

241,000,000 Sweepstakes$PO Box 1000000$Anytown, CA 12345$USA

********************************************************



I would like to instead map the Zimbra object "workStreet" to the rfc2256 standard "street" or "streetAddress"


http://www.faqs.org/rfcs/rfc2256.html

*********************************************************

5.10. street
This attribute contains the physical address of the object to which

the entry corresponds, such as an address for package delivery

(streetAddress).
( 2.5.4.9 NAME 'street' EQUALITY caseIgnoreMatch

SUBSTR caseIgnoreSubstringsMatch

SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )

*********************************************************


schemers
Outstanding Member
Outstanding Member
Posts: 225
Joined: Fri Sep 12, 2014 9:53 pm

Change the GAL External LDAP mappings?

Postby schemers » Sun Oct 23, 2005 12:19 pm

Hi. It sounds like you are right.
As far as changing the mappings, the mappings themselves are stored in LDAP, in the "cn=config,cn=zimbra" DN:


zimbraGalLdapAttrMap: co=workCountry

zimbraGalLdapAttrMap: company=company

zimbraGalLdapAttrMap: givenName=firstName

zimbraGalLdapAttrMap: sn=lastName

zimbraGalLdapAttrMap: displayName,cn=fullName

zimbraGalLdapAttrMap: initials=initials

zimbraGalLdapAttrMap: l=workCity

zimbraGalLdapAttrMap: physicalDeliveryOfficeName=office

zimbraGalLdapAttrMap: ou=department

zimbraGalLdapAttrMap: postalAddress=workStreet

zimbraGalLdapAttrMap: postalCode=workPostalCode

zimbraGalLdapAttrMap: telephoneNumber=workPhone

zimbraGalLdapAttrMap: st=workState

zimbraGalLdapAttrMap: zimbraMailDeliveryAddress,mail=email

zimbraGalLdapAttrMap: zimbraMailAlias=email2

zimbraGalLdapAttrMap: title=jobTitle


The attribute on the left hand side of the "=" is the LDAP attribute, and the attribute on the right is our address book attribute name. If there are multiple attributes on the left hand side (separated by commas) then it means use the first attribute that is set.
I seem to recall this (mapping) is described in the admin docs, but I maybe wrong.
I'll go ahead and file a bug and fix this.
thanks, roland
schemers
Outstanding Member
Outstanding Member
Posts: 225
Joined: Fri Sep 12, 2014 9:53 pm

Change the GAL External LDAP mappings?

Postby schemers » Sun Oct 23, 2005 12:28 pm

bug: 4295 in our db (our bug db isn't public yet, but will be soon), and fixed for next release.
thanks!
roland
bmiddleton
Posts: 5
Joined: Fri Sep 12, 2014 9:58 pm

Change the GAL External LDAP mappings?

Postby bmiddleton » Sun Oct 23, 2005 10:25 pm

thanks for the reply roland,
2 question,
1) you've told me where the mapping is, but I'm not sure how to change it. None, of the command line tools look like they can change this mapping. I know the docs say don't use an external LDAP browser to change anything, but is that the only way?
2) any chance the other feilds could be imported from the external LDAP for the GAL. Example, we keep home address, cell numbers, and other information in our LDAP server, being that it's external to Zimbra, is there feilds that I could map to. When I'm in the web client and select to add a new personal contact I see all the feilds we need. I just want to be able to have those same feilds in the GAL and map them to an external LDAP services.
thanks for all the help

-Brian
schemers
Outstanding Member
Outstanding Member
Posts: 225
Joined: Fri Sep 12, 2014 9:53 pm

Change the GAL External LDAP mappings?

Postby schemers » Sun Oct 23, 2005 11:21 pm

You can use zmprov to change global config via:


zmprov mcf attr1 value1 [attr2 value2...]


When changing multi-value attributes with zmprov, you currently need to specify all of them in one modify, as they are all replaced. So you'll have to do something like:


zmprov mcf zimbraGalLdapAttrMap a=b zimbraGalLdapAttrMap c=d ...


For this particular case it is also safe to modify those values directly in LDAP if you'd like (via ldapmodify, etc). You'll need to restart the server to have it pick up the changes.
To map other fields, you can probably look at Contact.java (server) or ZmContact.js (client code) to see the fields we currently support in the UI.
I'll include the ones from ZmContact.js here.


ZmContact.F_assistantPhone = "assistantPhone";

ZmContact.F_callbackPhone = "callbackPhone";

ZmContact.F_carPhone = "carPhone";

ZmContact.F_company = "company";

ZmContact.F_companyPhone = "companyPhone";

ZmContact.F_email = "email";

ZmContact.F_email2 = "email2";

ZmContact.F_email3 = "email3";

ZmContact.F_fileAs = "fileAs";

ZmContact.F_firstName = "firstName";

ZmContact.F_homeCity = "homeCity";

ZmContact.F_homeCountry = "homeCountry";

ZmContact.F_homeFax = "homeFax";

ZmContact.F_homePhone = "homePhone";

ZmContact.F_homePhone2 = "homePhone2";

ZmContact.F_homePostalCode = "homePostalCode";

ZmContact.F_homeState = "homeState";

ZmContact.F_homeStreet = "homeStreet";

ZmContact.F_homeURL = "homeURL";

ZmContact.F_jobTitle = "jobTitle";

ZmContact.F_lastName = "lastName";

ZmContact.F_middleName = "middleName";

ZmContact.F_mobilePhone = "mobilePhone";

ZmContact.F_namePrefix = "namePrefix";

ZmContact.F_nameSuffix = "nameSuffix";

ZmContact.F_notes = "notes";

ZmContact.F_otherCity = "otherCity";

ZmContact.F_otherCountry = "otherCountry";

ZmContact.F_otherFax = "otherFax";

ZmContact.F_otherPhone = "otherPhone";

ZmContact.F_otherPostalCode = "otherPostalCode";

ZmContact.F_otherState = "otherState";

ZmContact.F_otherStreet = "otherStreet";

ZmContact.F_otherURL = "otherURL";

ZmContact.F_pager = "pager";

ZmContact.F_workCity = "workCity";

ZmContact.F_workCountry = "workCountry";

ZmContact.F_workFax = "workFax";

ZmContact.F_workPhone = "workPhone";

ZmContact.F_workPhone2 = "workPhone2";

ZmContact.F_workPostalCode = "workPostalCode";

ZmContact.F_workState = "workState";

ZmContact.F_workStreet = "workStreet";

ZmContact.F_workURL = "workURL";


thanks, roland
malheiros
Posts: 8
Joined: Fri Sep 12, 2014 9:55 pm

Change the GAL External LDAP mappings?

Postby malheiros » Wed Nov 16, 2005 11:10 pm

Hello,
Im trying to change an attribute mapping like the instructions above, but I'm getting the following error:
[root@mail bin]# ./zmprov mcf zimbraGalLdapAttrMap displayName=fullName

ERROR: service.INVALID_REQUEST (invalid request: zimbragalldapattrmap is immutable)
I want to take off the "cn" from fullName, but says that attribute is immutable...
Weird?
Thanks!
schemers
Outstanding Member
Outstanding Member
Posts: 225
Joined: Fri Sep 12, 2014 9:53 pm

Change the GAL External LDAP mappings?

Postby schemers » Wed Nov 16, 2005 11:24 pm

oops, my bad recommending zmprov in the earlier post.
You'll have to use ldapmodify and/or an ldap browser to change that value, as that attribute is indeed marked as "immutable" in the zimbraattrs.xml file so it doesn't accidently get changed.
Let me know if you need help with the syntax...
roland
malheiros
Posts: 8
Joined: Fri Sep 12, 2014 9:55 pm

Change the GAL External LDAP mappings?

Postby malheiros » Thu Nov 17, 2005 5:44 pm

Thanks Roland,
Yes, it would be great if you could provide a sample command line using ldapmodify, not only for myself but for poeple in the community browsing the forums for answers like this :)
I've tried a couple times but I'm still doing the syntax wrong somehow, so if you please, just to clear some minds ;)
Thanks a lot
17629anand
Zimbra Alumni
Zimbra Alumni
Posts: 273
Joined: Fri Sep 12, 2014 9:53 pm

Change the GAL External LDAP mappings?

Postby 17629anand » Thu Nov 17, 2005 8:34 pm

Not the same attribute you are looking to modify, but should help.

See attached script.

modify-example.txt

malheiros
Posts: 8
Joined: Fri Sep 12, 2014 9:55 pm

Change the GAL External LDAP mappings?

Postby malheiros » Fri Nov 18, 2005 10:48 pm

Sweet... Theres also some other neat tips inside the script, like retrieving the ldaproot password and dn with zmlocalconfig :rolleyes:
Thanks!

Return to “Installation and Upgrade”

Who is online

Users browsing this forum: Google [Bot] and 3 guests