King0770-Notes-SearchGal-Edit

Revision as of 10:05, 12 July 2015 by Jorge de la Cruz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

King Notes SearchGAL

   KB 2870        Last updated on 2015-07-12  




0.00
(0 votes)


If you ever wanted to search in the GAL based on postalCode, street, and company, you can modify the Global config setting for zimbraGalLdapFilterDef.

Basically, you need to modify the zimbraAccounts for the zimbraGalLdapFilterDef setting.

In our example, we'll add (company=*%s*)(postalCode=*%s*)(street=*%s*)

First, to make things easy, lets create an input file; zmprov can take commands from an input file. i.e., zmprov < /tmp/someiputFile

To create the input file:

zmprov gcf zimbraGalLdapFilterDef >> /tmp/editSearchGal

Next you'll need to edit the input file to include (company=*%s*)(postalCode=*%s*)(street=*%s*).
Here's an example of what you should be looking for; extra search settings added. Look for the line "zimbraGalLdapFilterDef: zimbraAccounts:"

zimbraGalLdapFilterDef: zimbraAccounts:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)
(zimbraMailAlias=*%s*)(company=*%s*)(postalCode=*%s*)(street=*%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList))
(!(objectclass=zimbraCalendarResource)))

My rationale for making an input file is because, zimbraGalLdapFilterDef is a multi-valued attribute, and can be tricky to change by command line. Using the input file can be useful in case you need to make a lot of adjustments.

Below is an example of the inut file. Note the first line is for clearing the zimbraGalLdapFilterDef attribute which is necessary. Also, note our new changes to the zimbraAccounts line.

We'll call the input file, /tmp/editSearchGal


mcf zimbraGalLdapFilterDef ""
mcf +zimbraGalLdapFilterDef externalLdapAutoComplete:(|(cn=%s*)(sn=%s*)(gn=%s*)(mail=%s*))
mcf +zimbraGalLdapFilterDef zimbraAccountAutoComplete:(&(|(displayName=%s*)(cn=%s*)(sn=%s*)(gn=%s*)(mail=%s*)(zimbraMailDeliveryAddress=%s*)
(zimbraMailAlias=%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList))(!(objectclass=zimbraCalendarResource)))
mcf +zimbraGalLdapFilterDef zimbraAccountSync:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)
(zimbraMailAlias=*%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList))(!(objectclass=zimbraCalendarResource)))
mcf +zimbraGalLdapFilterDef zimbraAccounts:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)
(zimbraMailAlias=*%s*)(company=*%s*)(postalCode=*%s*)(street=*%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList))
(!(objectclass=zimbraCalendarResource)))
mcf +zimbraGalLdapFilterDef zimbraResourceAutoComplete:(&(|(displayName=%s*)(cn=%s*)(sn=%s*)(gn=%s*)(mail=%s*)(zimbraMailDeliveryAddress=%s*)
(zimbraMailAlias=%s*))(objectclass=zimbraCalendarResource))
mcf +zimbraGalLdapFilterDef zimbraResourceSync:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)
(zimbraMailAlias=*%s*))(objectclass=zimbraCalendarResource))
mcf +zimbraGalLdapFilterDef zimbraResources:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)
(zimbraMailAlias=*%s*))(objectclass=zimbraCalendarResource))
mcf +zimbraGalLdapFilterDef ad:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(givenName=*%s*)(mail=*%s*))(!(msExchHideFromAddressLists=TRUE))
(mailnickname=*)(|(&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)
(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact))(objectCategory=group)
(objectCategory=publicFolder)(objectCategory=msExchDynamicDistributionList)))
mcf +zimbraGalLdapFilterDef adAutoComplete:(&(|(displayName=%s*)(cn=%s*)(sn=%s*)(givenName=%s*)(mail=%s*))(!(msExchHideFromAddressLists=TRUE))
(mailnickname=*)(|(&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)
(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact))(objectCategory=group)
(objectCategory=publicFolder)(objectCategory=msExchDynamicDistributionList)))

fc config

After creating the /tmp/editSearchGal file, run the following:

zmprov < /tmp/editSearchGal

Next, go to the web client. Search for a company, and make sure you select "Global Address List".

It should be noted, this does not work in 7.x.
Notable bug:http://bugzilla.zimbra.com/show_bug.cgi?id=75880

Verified Against: Zimbra Collaboration 7.0 Date Created: 04/16/2014
Article ID: https://wiki.zimbra.com/index.php?title=King0770-Notes-SearchGal-Edit Date Modified: 2015-07-12



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search