Adrin Jalali

  • Blog
  • About
  • Get in Touch
  • Curriculum Vitae
  • Categories
  • Tags

Zimbra Auto Provisioning from FreeIPA

After quite a few days struggling to configure a Zimbra server so that it automatically fetches users from our freeIPA (LDAP) server, I finally managed to have a configuration which works. I got help from a bunch of pages like this and this one. This comes after you fix the external LDAP authentication and probably also external GAL configuration on your Zimbra server.

zmprov gives you a nice terminal to configure the server:

$ su - zimbra
$ zmprov

This is the set of commands I used to set it up:

prov> md mysampledomain.net zimbraAutoProvAccountNameMap "uid"
prov> md mysampledomain.net zimbraAutoProvAttrMap "givenName=givenName"
prov> md mysampledomain.net +zimbraAutoProvAttrMap "sn=sn"
prov> md mysampledomain.net zimbraAutoProvBatchSize 80
prov> md mysampledomain.net zimbraAutoProvLdapAdminBindDn "uid=mail_server,cn=users,cn=accounts,dc=mysampledomain,dc=net"
prov> md mysampledomain.net zimbraAutoProvLdapAdminBindPassword "myverysecretpassword"
prov> md mysampledomain.net zimbraAutoProvLdapBindDn "uid=mail_server,cn=users,cn=accounts,dc=mysampledomain,dc=net"
prov> md mysampledomain.net zimbraAutoProvLdapSearchBase "cn=accounts,dc=mysampledomain,dc=net"
prov> md mysampledomain.net zimbraAutoProvLdapSearchFilter "(&(ObjectClass=person))"
prov> md mysampledomain.net zimbraAutoProvLdapStartTlsEnabled TRUE
prov> md mysampledomain.net zimbraAutoProvLdapURL "ldaps://ipa.mysampledomain.net:636"
prov> md mysampledomain.net zimbraAutoProvPollingInterval "10m"
prov> md mysampledomain.net zimbraAutoProvScheduledDomains "mysampledomain.net"
prov> md mysampledomain.net zimbraAutoProvMode "EAGER"

To diagnose why the system wasn’t working, I also had to figure out where the log files are, and how to produce more logs. Oddly enough, they’re not in /var/log, and instead they are written by default in /opt/zimbra/log/mailbox.log, or other related files in that folder. I added log4j.logger.zimbra.autoprov=TRACE at the end of my /opt/zimbra/conf/log4j.properties file, which will be overwritten next time I restart the services using the configurations in /opt/zimbra/conf/log4j.properties.in. Finally to make the logging system reload the logging configuration, you need to run zmprov rlog. You find more info here.

Comments
comments powered by Disqus

Published

Aug 7, 2015

Category

sysadmin

Tags

  • freeipa 1
  • ldap 1
  • zimbra 1

Contact

  • email
  • github
  • stack-overflow
  • linkedin

Recent Posts all posts

Remote Work - Connections - Open Source
posted in work-culture
Thu 06 May 2021
On Benefits of Working with an Open Source Community - Corporate Perspective
posted in open-source
Fri 19 February 2021
GIT/GITHUB, how to contribute to an open source project on GitHub?
posted in open-source
Thu 28 May 2020
Open Source - CoC - Conflicts
posted in open-source
Sun 12 April 2020
FOSDEM 2020
posted in blog
Sun 02 February 2020
  • Creative Commons License
    This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
  • Powered by Pelican. Theme: Elegant by Talha Mansoor