Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Installation

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-23-2005, 09:17 AM
Junior Member
 
Posts: 5
Default Change the GAL External LDAP mappings?

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} )
************************************************** *******
Reply With Quote
  #2 (permalink)  
Old 10-23-2005, 11:19 AM
Zimbra Employee
 
Posts: 228
Default

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:

Code:
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
Reply With Quote
  #3 (permalink)  
Old 10-23-2005, 11:28 AM
Zimbra Employee
 
Posts: 228
Default

bug: 4295 in our db (our bug db isn't public yet, but will be soon), and fixed for next release.

thanks!

roland
Reply With Quote
  #4 (permalink)  
Old 10-23-2005, 09:25 PM
Junior Member
 
Posts: 5
Default

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
Reply With Quote
  #5 (permalink)  
Old 10-23-2005, 10:21 PM
Zimbra Employee
 
Posts: 228
Default

You can use zmprov to change global config via:

Code:
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:

Code:
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.

Code:
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
Reply With Quote
  #6 (permalink)  
Old 11-16-2005, 10:10 PM
Junior Member
 
Posts: 8
Unhappy zimbragalldapattrmap is Immutable?

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!
Reply With Quote
  #7 (permalink)  
Old 11-16-2005, 10:24 PM
Zimbra Employee
 
Posts: 228
Default

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
Reply With Quote
  #8 (permalink)  
Old 11-17-2005, 04:44 PM
Junior Member
 
Posts: 8
Red face

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
Reply With Quote
  #9 (permalink)  
Old 11-17-2005, 07:34 PM
Zimbra Employee
 
Posts: 274
Default example

Not the same attribute you are looking to modify, but should help.
See attached script.
Attached Files
File Type: txt modify-example.txt (1.0 KB, 643 views)
Reply With Quote
  #10 (permalink)  
Old 11-18-2005, 09:48 PM
Junior Member
 
Posts: 8
Talking

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

Thanks!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.