6. 6
Migrations Issue
Temporary Using Dual Platform,
Password Migration
Dual Platform Issue
Permanently Using Dual Platform
Sending Restriction
Email Sending Restriction (Size,
Subject, etc)
Forgotten password
Admin Burden for resetting
forgotten password
Authentication Issue
Multiple Authentication Services
Issue
Log Management Issue
Understanding Current Condition
Easily
Users Signature
No Standardization for Users’
signatures Issue
Spam And Virus
Database for anti-spam is not up
to date and olny have basic
feature
Local Expert
The obvious need for the skilled
resources
Reliable Support
The obvious need for the reliable
support
About Us: Providing Custom Solution
14. 14Zimbra Scripting - zmprov
The zmprov tool performs all provisioning tasks in Zimbra LDAP, including creating accounts, aliases, domains, COS,
distribution lists, and calendar resources
Example:
● Creating user.
zmprov ca omar@jabetto.lab inibudi
● Set user attribute
zmprov ma omar@jabetto.lab sn Mochtar
● Get user attributes
zmprov ga omar@jabetto.lab
● Deleting user.
zmprov da omar@jabetto.lab
15. 15Zimbra Scripting - zmprov
Binded with bash for scripting purpose
Example:
● Create 100 dummy user with default password selamat123
for user in {1..100}; do
zmprov ca user$x@jabetto.lab selamat123
done
Const: slow in every executing zmprov, Java app behaviour (?).
Solution: Dump zmprov arguments in one file then set as input stream with arguments -f
Example:
● Create file contains zmprov arguments
cat > /tmp/runme
ca user1@jabetto.lab selamat123
ca user2@jabetto.lab selamat123
ca user3@jabetto.lab selamat123
...
● Run in single zmprov command
zmprov -f /tmp/runme
Const: Cannot add logic from input file stream.
Solution: Using direct zimbra API call in one java process instance.
17. 17Zimbra Scripting - zmpython
● zmpython = Jython + Zimbra Java API.
● Included in every zimbra distribution release ( /opt/zimbra/bin/zmpython ).
● Logic Flexibility in single java process.
● Rather slow in execution, but blazingly fast while executing python with zimbra Library.
● We can do all task beyond zimbra API.
● But …..
There is no such documentation refer to zmpython, so we are call it ZAlien
18. 18Zimbra Scripting - zmpython
So, The best zmpython documentation is the source code of Zimbra it self. Some of forking available in github. Eg:
19. 19Zimbra Scripting - zmpython
Example: creating 100 user in batch with selamat123 as default password
● Create python script then save/upload it to zimbra server.
● Execute it with zmpython command.
/opt/zimbra/bin/zmpython /tmp/create100user.py
20. 20Zimbra Scripting - zmpython
Speed Comparison DEMO:
CASE: Get User All Mailbox Size
Bash (zmprov & zmmailbox) VS zmpython
22. 22Zimbra Scripting - Zimbra API
● For integrating 3th party apps to zimbra with ease.
● You can calling what Zimbra Admin Console do and beyond.
● Good documentation are there :) .
● Use zmsoap command for direct soap call or as testing purpose.
● Bunch of Zimbra API library for (some) famous proglang are there (eg: github).
● In Jabetto, we are using it a lot (almost) in every our product or for some task
automation.
23. 23Zimbra Scripting - Zimbra API
Task automation example: Mail sending & receiving test
24. 24Zimbra Scripting - Zimbra API
In our product example: Jlimiter, fetch Zimbra Information Data