King0770-Notes-SearchGal-Edit: Difference between revisions
(New page: {{WIP}} If you ever wanted to search in the GAL based on postalCode, street, and company, you can modify the Global config setting for zimbraGalLdapFilterDef. <br> Basically, you need to...) |
No edit summary |
||
Line 7: | Line 7: | ||
In our example, we'll add '''(company=*%s*)(postalCode=*%s*)(street=*%s*)''' <br> | In our example, we'll add '''(company=*%s*)(postalCode=*%s*)(street=*%s*)''' <br> | ||
First, to make things easy, lets create an input file; zmprov can take commands from | First, to make things easy, lets create an input file; zmprov can take commands from an input file. i.e., zmprov < /tmp/someiputFile <br> | ||
To create the input file:<br> | To create the input file:<br> | ||
Line 66: | Line 66: | ||
[[Category: Community Sandbox]] | [[Category: Community Sandbox]] | ||
[[Category: LDAP]] |
Revision as of 14:49, 14 May 2009
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.
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 zimbraA
ccounts 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".