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).
-
Download version 20090310-dev.
Improved functionality. Multivalued attributes are now properly honored. Note that there could be attributes that are multivalued but are not properly handled yet.
-
Download version 20080113-dev.
This is almost a proof of concept, i.e. much of the necessary functionality is missing. E.g. error handling is almost non-existent, furthermore, some attributes are multivalued but for the moment only single value is accessible. Also, not all operations are (yet) supported.
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:
- 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.
- 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.
- 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.
- 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.
Notes
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.