Stjepan Groš

Python, Zimbra and SOAP

I started to write a Python class that will allow one to access Zimbra server through it's SOAP interface. This code is in the early stage of development (read: pre-alpha) and is covered by the GPLv2 license. For the moment only admin interface is accessible through this class.

Additionaly, this code has been developed using Zimbra 5 and is not tested with any other version of Zimbra (pre 5, and 6).

If you have any suggestions, modifications or bug reports please send them to my mail.

AD<-->Zimbra Sync

The ZimbraAdmin module has been developed to allow me to write the code that will allow synchronization between ActiveDirectory and ZimbraServer. This code is also here but it's more of a hack than something useful. Nevertheless, maybe someone finds it useful. Here are some additional notes about this code:

  1. The mail setup I'm working with has two mail server. The primary one on the central location and the secondary on the disaster recovery site.
  2. When the script is run on the primary site to each mail account created forwarding address is added that will forward each received mail to the secondary mail server.
  3. Mail addresses in the AD are stored in the url attribute of the user. The reason was that, as far as I remember, mail attribute is a single valued.
  4. Distribution lists are created from the groups, but the groups have to begin with prefix G (note the space after letter G).

So if you are still interested download the code.

If you find a bug, or need some improvement in either AD sync code, or ZimbraAdmin module feel free to contact me. If I find time, I'll try to fix/improve it.


During the development I stumbled on the following error reported by the Zimbra's SOAP engine:

com.zimbra.common.service.ServiceException: parse error: expected character: {:

The problem was that I had a new line before the first line of the SOAP request. I don't know why Zimbra's parser thought I'm missing open bracket but it took me a day or two to figure this out.