King0770-Notes-SearchGal-Edit: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{BC|Community Sandbox}} | |||
__FORCETOC__ | |||
<div class="col-md-12 ibox-content"> | |||
=King Notes SearchGAL= | |||
{{KB|{{Unsupported}}|{{ZCS 7.0}}||}} | |||
{{WIP}} | {{WIP}} | ||
Line 67: | Line 72: | ||
<strong> Notable bug:</strong>http://bugzilla.zimbra.com/show_bug.cgi?id=75880 | <strong> Notable bug:</strong>http://bugzilla.zimbra.com/show_bug.cgi?id=75880 | ||
{{Article Footer|Zimbra Collaboration 7.0|04/16/2014}} | |||
[[Category: LDAP]] | [[Category: LDAP]] |
Latest revision as of 10:05, 12 July 2015
King Notes SearchGAL
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