SlideShare a Scribd company logo
1
.
Zimbra Scripting With Python
By : Imam Omar Mochtar (omar@jabetto.com )
Kopdar Python-id
Jogja, 2016
2
About Us
As Zimbra Provider for Email Solution
3
01
02
03
04
Leading Zimbra Provider in Indonesia
Enterprise-class Support
Professional Services
Established in 2009
4About Us: Authorized Zimbra Gold Partner
5About Us: Authorized Zimbra Training Center
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
7About Us: EMAIL & COLLABORATION RELATED PRODUCTS AND SERVICES
8
Zimbra Intro
9ZIMBRA COMPONENTS
Bundled with Open Source Apps.
10Multi server Architecture
11ZIMBRA WEBCLIENT
12ZIMBRA Admin Console
13
Zimbra Scripting
Using zmprov
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
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.
16
Zimbra Scripting
Using zmpython
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
18Zimbra Scripting - zmpython
So, The best zmpython documentation is the source code of Zimbra it self. Some of forking available in github. Eg:
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
20Zimbra Scripting - zmpython
Speed Comparison DEMO:
CASE: Get User All Mailbox Size
Bash (zmprov & zmmailbox) VS zmpython
21
Zimbra Scripting
Using zimbra API
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.
23Zimbra Scripting - Zimbra API
Task automation example: Mail sending & receiving test
24Zimbra Scripting - Zimbra API
In our product example: Jlimiter, fetch Zimbra Information Data
25Zimbra Scripting - Zimbra API
DEMO
What API Documentation Says
26Zimbra Scripting - Zimbra API
zmsoap ( within zimbra server)
27Zimbra Scripting - Zimbra API
Direct SOAP API Call (from another host)
1. Get Token 2. Use token in every soap call
28Zimbra Scripting - Zimbra API
Direct SOAP API Call (from another host)
3. Example for create an account
29
NEXT: Q&A
Thanks!

More Related Content

PPTX
Java Lambda Expressions.pptx
PDF
Modul Praktikum Pemrograman Berorientasi Objek (Chap.10)
PPT
inheritance
PPT
Algoritma penjadwalan proses
DOC
Java (Netbeans) - Abstract & Interface - Object Oriented Programming
PPTX
Pewarisan (inheritance) pada JAVA
PPT
Quantum Intelligence: Responsible Human-AI Entities
PPTX
Tipe data abstract
Java Lambda Expressions.pptx
Modul Praktikum Pemrograman Berorientasi Objek (Chap.10)
inheritance
Algoritma penjadwalan proses
Java (Netbeans) - Abstract & Interface - Object Oriented Programming
Pewarisan (inheritance) pada JAVA
Quantum Intelligence: Responsible Human-AI Entities
Tipe data abstract

What's hot (20)

PPTX
java memory management & gc
PPT
Java inheritance
PPTX
Python oop class 1
PDF
Algoritma dan Struktur Data - Abstract Data Type
PPT
Modul 8 - Jaringan Syaraf Tiruan (JST)
PPSX
Exception hierarchy
PDF
Lab work servlets and jsp
PPTX
Java abstract class & abstract methods
PPT
Polymorphism in java
ODP
An Introduction To Java Profiling
PPTX
03 Single layer Perception Classifier
PDF
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
PPTX
Pengolahan Citra Digital - Bab15 - Pengenalan Pola
PPTX
Simple java program
PDF
Java - OOPS and Java Basics
PDF
Neural Network from Scratch in Python
PDF
LinkedList vs ArrayList in Java | Edureka
PDF
Python lambda functions with filter, map & reduce function
PDF
If You Think You Can Stay Away from Functional Programming, You Are Wrong
PPTX
Inheritance in Java
java memory management & gc
Java inheritance
Python oop class 1
Algoritma dan Struktur Data - Abstract Data Type
Modul 8 - Jaringan Syaraf Tiruan (JST)
Exception hierarchy
Lab work servlets and jsp
Java abstract class & abstract methods
Polymorphism in java
An Introduction To Java Profiling
03 Single layer Perception Classifier
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Pengolahan Citra Digital - Bab15 - Pengenalan Pola
Simple java program
Java - OOPS and Java Basics
Neural Network from Scratch in Python
LinkedList vs ArrayList in Java | Edureka
Python lambda functions with filter, map & reduce function
If You Think You Can Stay Away from Functional Programming, You Are Wrong
Inheritance in Java
Ad

Similar to Zimbra scripting with python (20)

PDF
Gearman - Northeast PHP 2012
PDF
Gearman: A Job Server made for Scale
PPTX
How to Run LLM Locally, and Why - Marko Lohert - Graz 2025.pptx
PDF
12 tricks to avoid hackers breaks your CI / CD
PDF
Us 17-krug-hacking-severless-runtimes
PPTX
Jstorm introduction-0.9.6
PDF
Symfony Performance
KEY
Concurrency in ruby
PPT
Zimbra admin ui demo presentation
PDF
Black hat dc-2010-egypt-uav-slides
PDF
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
PDF
Distributed Queue System using Gearman
PDF
Performance profiling and testing of symfony application 2
PDF
Gearman work queue in php
PPTX
AppSec California 2016 - Making Security Agile
PDF
Python Hashlib & A True Story of One Bug
PPTX
Java performance tuning
PDF
Porting Rails Apps to High Availability Systems
PDF
Writing and deploying serverless python applications
PDF
Linux Desktop Automation
Gearman - Northeast PHP 2012
Gearman: A Job Server made for Scale
How to Run LLM Locally, and Why - Marko Lohert - Graz 2025.pptx
12 tricks to avoid hackers breaks your CI / CD
Us 17-krug-hacking-severless-runtimes
Jstorm introduction-0.9.6
Symfony Performance
Concurrency in ruby
Zimbra admin ui demo presentation
Black hat dc-2010-egypt-uav-slides
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
Distributed Queue System using Gearman
Performance profiling and testing of symfony application 2
Gearman work queue in php
AppSec California 2016 - Making Security Agile
Python Hashlib & A True Story of One Bug
Java performance tuning
Porting Rails Apps to High Availability Systems
Writing and deploying serverless python applications
Linux Desktop Automation
Ad

Recently uploaded (20)

PDF
Digital Strategies for Manufacturing Companies
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPT
Introduction Database Management System for Course Database
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
medical staffing services at VALiNTRY
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
System and Network Administration Chapter 2
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
AI in Product Development-omnex systems
PDF
top salesforce developer skills in 2025.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Online Work Permit System for Fast Permit Processing
Digital Strategies for Manufacturing Companies
Upgrade and Innovation Strategies for SAP ERP Customers
How to Migrate SBCGlobal Email to Yahoo Easily
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Design an Analysis of Algorithms I-SECS-1021-03
Wondershare Filmora 15 Crack With Activation Key [2025
Design an Analysis of Algorithms II-SECS-1021-03
Introduction Database Management System for Course Database
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
VVF-Customer-Presentation2025-Ver1.9.pptx
ISO 45001 Occupational Health and Safety Management System
medical staffing services at VALiNTRY
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
System and Network Administration Chapter 2
Odoo POS Development Services by CandidRoot Solutions
AI in Product Development-omnex systems
top salesforce developer skills in 2025.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Online Work Permit System for Fast Permit Processing

Zimbra scripting with python

  • 1. 1 . Zimbra Scripting With Python By : Imam Omar Mochtar (omar@jabetto.com ) Kopdar Python-id Jogja, 2016
  • 2. 2 About Us As Zimbra Provider for Email Solution
  • 3. 3 01 02 03 04 Leading Zimbra Provider in Indonesia Enterprise-class Support Professional Services Established in 2009
  • 4. 4About Us: Authorized Zimbra Gold Partner
  • 5. 5About Us: Authorized Zimbra Training Center
  • 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
  • 7. 7About Us: EMAIL & COLLABORATION RELATED PRODUCTS AND SERVICES
  • 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
  • 25. 25Zimbra Scripting - Zimbra API DEMO What API Documentation Says
  • 26. 26Zimbra Scripting - Zimbra API zmsoap ( within zimbra server)
  • 27. 27Zimbra Scripting - Zimbra API Direct SOAP API Call (from another host) 1. Get Token 2. Use token in every soap call
  • 28. 28Zimbra Scripting - Zimbra API Direct SOAP API Call (from another host) 3. Example for create an account