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

What's hot

Android デバッグ小ネタ
Android デバッグ小ネタAndroid デバッグ小ネタ
Android デバッグ小ネタ
l_b__
 
OSSを活用したIaCの実現
OSSを活用したIaCの実現OSSを活用したIaCの実現
OSSを活用したIaCの実現
Trainocate Japan, Ltd.
 
MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法
Tetsutaro Watanabe
 
並列クエリを実行するPostgreSQLのアーキテクチャ
並列クエリを実行するPostgreSQLのアーキテクチャ並列クエリを実行するPostgreSQLのアーキテクチャ
並列クエリを実行するPostgreSQLのアーキテクチャ
Kohei KaiGai
 
GCDA - GIAC Certificated Detection Analyst
GCDA - GIAC Certificated Detection AnalystGCDA - GIAC Certificated Detection Analyst
GCDA - GIAC Certificated Detection Analyst
Justin Henderson
 
OSS活動の活発さと評価の関係について
OSS活動の活発さと評価の関係についてOSS活動の活発さと評価の関係について
OSS活動の活発さと評価の関係について
Takuto Wada
 
MUKENGE KANKONDE Zack mise en place d'un système de stockage et sauvegarde d...
MUKENGE KANKONDE  Zack mise en place d'un système de stockage et sauvegarde d...MUKENGE KANKONDE  Zack mise en place d'un système de stockage et sauvegarde d...
MUKENGE KANKONDE Zack mise en place d'un système de stockage et sauvegarde d...
ZackMukenge
 
IT エンジニアのための 流し読み Windows 10 - Microsoft Defender ウイルス対策
IT エンジニアのための 流し読み Windows 10 - Microsoft Defender ウイルス対策IT エンジニアのための 流し読み Windows 10 - Microsoft Defender ウイルス対策
IT エンジニアのための 流し読み Windows 10 - Microsoft Defender ウイルス対策
TAKUYA OHTA
 
微服務的基礎建設 - Service Discovery, Andrew Wu
微服務的基礎建設 - Service Discovery, Andrew Wu微服務的基礎建設 - Service Discovery, Andrew Wu
微服務的基礎建設 - Service Discovery, Andrew Wu
Andrew Wu
 
Javaはどのように動くのか~スライドでわかるJVMの仕組み
Javaはどのように動くのか~スライドでわかるJVMの仕組みJavaはどのように動くのか~スライドでわかるJVMの仕組み
Javaはどのように動くのか~スライドでわかるJVMの仕組み
Chihiro Ito
 
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
Masahito Zembutsu
 
Ansibleではじめるサーバー・ネットワークの自動化(2019/04版)
Ansibleではじめるサーバー・ネットワークの自動化(2019/04版)Ansibleではじめるサーバー・ネットワークの自動化(2019/04版)
Ansibleではじめるサーバー・ネットワークの自動化(2019/04版)
akira6592
 
Projet de Securité Informatique.ppt
Projet de Securité Informatique.pptProjet de Securité Informatique.ppt
Projet de Securité Informatique.ppt
NatijTDI
 
[GKE & Spanner 勉強会] Cloud Spanner の技術概要
[GKE & Spanner 勉強会] Cloud Spanner の技術概要[GKE & Spanner 勉強会] Cloud Spanner の技術概要
[GKE & Spanner 勉強会] Cloud Spanner の技術概要
Google Cloud Platform - Japan
 
[Cloud OnAir] Cloud Run Deep Dive ~ GCP で実践するモダンなサーバーレス アプリケーション開発 ~ 2019年9月...
[Cloud OnAir] Cloud Run Deep Dive  ~ GCP で実践するモダンなサーバーレス アプリケーション開発 ~ 2019年9月...[Cloud OnAir] Cloud Run Deep Dive  ~ GCP で実践するモダンなサーバーレス アプリケーション開発 ~ 2019年9月...
[Cloud OnAir] Cloud Run Deep Dive ~ GCP で実践するモダンなサーバーレス アプリケーション開発 ~ 2019年9月...
Google Cloud Platform - Japan
 
Infiniband hack-a-thon #2 Windows班まとめ資料 Windows Server 2012 + FDR Infinibandで...
Infiniband hack-a-thon #2 Windows班まとめ資料 Windows Server 2012 + FDR Infinibandで...Infiniband hack-a-thon #2 Windows班まとめ資料 Windows Server 2012 + FDR Infinibandで...
Infiniband hack-a-thon #2 Windows班まとめ資料 Windows Server 2012 + FDR Infinibandで...
milk hanakara
 
AWSで自宅サーバ?
AWSで自宅サーバ?AWSで自宅サーバ?
AWSで自宅サーバ?
祐磨 堀
 
フロー技術によるネットワーク管理
フロー技術によるネットワーク管理フロー技術によるネットワーク管理
フロー技術によるネットワーク管理
Motonori Shindo
 

What's hot (20)

Android デバッグ小ネタ
Android デバッグ小ネタAndroid デバッグ小ネタ
Android デバッグ小ネタ
 
OSSを活用したIaCの実現
OSSを活用したIaCの実現OSSを活用したIaCの実現
OSSを活用したIaCの実現
 
MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法
 
並列クエリを実行するPostgreSQLのアーキテクチャ
並列クエリを実行するPostgreSQLのアーキテクチャ並列クエリを実行するPostgreSQLのアーキテクチャ
並列クエリを実行するPostgreSQLのアーキテクチャ
 
Pfsense
PfsensePfsense
Pfsense
 
GCDA - GIAC Certificated Detection Analyst
GCDA - GIAC Certificated Detection AnalystGCDA - GIAC Certificated Detection Analyst
GCDA - GIAC Certificated Detection Analyst
 
OSS活動の活発さと評価の関係について
OSS活動の活発さと評価の関係についてOSS活動の活発さと評価の関係について
OSS活動の活発さと評価の関係について
 
MUKENGE KANKONDE Zack mise en place d'un système de stockage et sauvegarde d...
MUKENGE KANKONDE  Zack mise en place d'un système de stockage et sauvegarde d...MUKENGE KANKONDE  Zack mise en place d'un système de stockage et sauvegarde d...
MUKENGE KANKONDE Zack mise en place d'un système de stockage et sauvegarde d...
 
IT エンジニアのための 流し読み Windows 10 - Microsoft Defender ウイルス対策
IT エンジニアのための 流し読み Windows 10 - Microsoft Defender ウイルス対策IT エンジニアのための 流し読み Windows 10 - Microsoft Defender ウイルス対策
IT エンジニアのための 流し読み Windows 10 - Microsoft Defender ウイルス対策
 
微服務的基礎建設 - Service Discovery, Andrew Wu
微服務的基礎建設 - Service Discovery, Andrew Wu微服務的基礎建設 - Service Discovery, Andrew Wu
微服務的基礎建設 - Service Discovery, Andrew Wu
 
Javaはどのように動くのか~スライドでわかるJVMの仕組み
Javaはどのように動くのか~スライドでわかるJVMの仕組みJavaはどのように動くのか~スライドでわかるJVMの仕組み
Javaはどのように動くのか~スライドでわかるJVMの仕組み
 
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
 
Ansibleではじめるサーバー・ネットワークの自動化(2019/04版)
Ansibleではじめるサーバー・ネットワークの自動化(2019/04版)Ansibleではじめるサーバー・ネットワークの自動化(2019/04版)
Ansibleではじめるサーバー・ネットワークの自動化(2019/04版)
 
Free bsd jail入門
Free bsd jail入門Free bsd jail入門
Free bsd jail入門
 
Projet de Securité Informatique.ppt
Projet de Securité Informatique.pptProjet de Securité Informatique.ppt
Projet de Securité Informatique.ppt
 
[GKE & Spanner 勉強会] Cloud Spanner の技術概要
[GKE & Spanner 勉強会] Cloud Spanner の技術概要[GKE & Spanner 勉強会] Cloud Spanner の技術概要
[GKE & Spanner 勉強会] Cloud Spanner の技術概要
 
[Cloud OnAir] Cloud Run Deep Dive ~ GCP で実践するモダンなサーバーレス アプリケーション開発 ~ 2019年9月...
[Cloud OnAir] Cloud Run Deep Dive  ~ GCP で実践するモダンなサーバーレス アプリケーション開発 ~ 2019年9月...[Cloud OnAir] Cloud Run Deep Dive  ~ GCP で実践するモダンなサーバーレス アプリケーション開発 ~ 2019年9月...
[Cloud OnAir] Cloud Run Deep Dive ~ GCP で実践するモダンなサーバーレス アプリケーション開発 ~ 2019年9月...
 
Infiniband hack-a-thon #2 Windows班まとめ資料 Windows Server 2012 + FDR Infinibandで...
Infiniband hack-a-thon #2 Windows班まとめ資料 Windows Server 2012 + FDR Infinibandで...Infiniband hack-a-thon #2 Windows班まとめ資料 Windows Server 2012 + FDR Infinibandで...
Infiniband hack-a-thon #2 Windows班まとめ資料 Windows Server 2012 + FDR Infinibandで...
 
AWSで自宅サーバ?
AWSで自宅サーバ?AWSで自宅サーバ?
AWSで自宅サーバ?
 
フロー技術によるネットワーク管理
フロー技術によるネットワーク管理フロー技術によるネットワーク管理
フロー技術によるネットワーク管理
 

Similar to Zimbra scripting with python

Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012
Mike Willbanks
 
Gearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleGearman: A Job Server made for Scale
Gearman: A Job Server made for Scale
Mike Willbanks
 
12 tricks to avoid hackers breaks your CI / CD
12 tricks to avoid hackers breaks your  CI / CD12 tricks to avoid hackers breaks your  CI / CD
12 tricks to avoid hackers breaks your CI / CD
Daniel Garcia (a.k.a cr0hn)
 
Us 17-krug-hacking-severless-runtimes
Us 17-krug-hacking-severless-runtimesUs 17-krug-hacking-severless-runtimes
Us 17-krug-hacking-severless-runtimes
Ravishankar Somasundaram
 
Jstorm introduction-0.9.6
Jstorm introduction-0.9.6Jstorm introduction-0.9.6
Jstorm introduction-0.9.6
longda feng
 
Symfony Performance
Symfony PerformanceSymfony Performance
Symfony Performance
Paul Thrasher
 
Concurrency in ruby
Concurrency in rubyConcurrency in ruby
Concurrency in ruby
Marco Borromeo
 
Zimbra admin ui demo presentation
Zimbra admin ui demo presentationZimbra admin ui demo presentation
Zimbra admin ui demo presentation
solarisyourep
 
Black hat dc-2010-egypt-uav-slides
Black hat dc-2010-egypt-uav-slidesBlack hat dc-2010-egypt-uav-slides
Black hat dc-2010-egypt-uav-slides
Bakry3
 
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
High Availability Architecture for Legacy Stuff - a 10.000 feet overviewHigh Availability Architecture for Legacy Stuff - a 10.000 feet overview
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
Marco Amado
 
Distributed Queue System using Gearman
Distributed Queue System using GearmanDistributed Queue System using Gearman
Distributed Queue System using Gearman
Eric Cho
 
Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2
Andrew Yatsenko
 
Gearman work queue in php
Gearman work queue in phpGearman work queue in php
Gearman work queue in php
Bo-Yi Wu
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security Agile
Oleg Gryb
 
Python Hashlib & A True Story of One Bug
Python Hashlib & A True Story of One BugPython Hashlib & A True Story of One Bug
Python Hashlib & A True Story of One Bug
delimitry
 
Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
Jerry Kurian
 
Porting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsPorting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability Systems
Marcelo Pinheiro
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applications
Cesar Cardenas Desales
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop Automation
Rui Lapa
 
First adventure within a shell - Andrea Telatin at Quadram Institute
First adventure within a shell - Andrea Telatin at Quadram InstituteFirst adventure within a shell - Andrea Telatin at Quadram Institute
First adventure within a shell - Andrea Telatin at Quadram Institute
Andrea Telatin
 

Similar to Zimbra scripting with python (20)

Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012
 
Gearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleGearman: A Job Server made for Scale
Gearman: A Job Server made for Scale
 
12 tricks to avoid hackers breaks your CI / CD
12 tricks to avoid hackers breaks your  CI / CD12 tricks to avoid hackers breaks your  CI / CD
12 tricks to avoid hackers breaks your CI / CD
 
Us 17-krug-hacking-severless-runtimes
Us 17-krug-hacking-severless-runtimesUs 17-krug-hacking-severless-runtimes
Us 17-krug-hacking-severless-runtimes
 
Jstorm introduction-0.9.6
Jstorm introduction-0.9.6Jstorm introduction-0.9.6
Jstorm introduction-0.9.6
 
Symfony Performance
Symfony PerformanceSymfony Performance
Symfony Performance
 
Concurrency in ruby
Concurrency in rubyConcurrency in ruby
Concurrency in ruby
 
Zimbra admin ui demo presentation
Zimbra admin ui demo presentationZimbra admin ui demo presentation
Zimbra admin ui demo presentation
 
Black hat dc-2010-egypt-uav-slides
Black hat dc-2010-egypt-uav-slidesBlack hat dc-2010-egypt-uav-slides
Black hat dc-2010-egypt-uav-slides
 
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
High Availability Architecture for Legacy Stuff - a 10.000 feet overviewHigh Availability Architecture for Legacy Stuff - a 10.000 feet overview
High Availability Architecture for Legacy Stuff - a 10.000 feet overview
 
Distributed Queue System using Gearman
Distributed Queue System using GearmanDistributed Queue System using Gearman
Distributed Queue System using Gearman
 
Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2
 
Gearman work queue in php
Gearman work queue in phpGearman work queue in php
Gearman work queue in php
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security Agile
 
Python Hashlib & A True Story of One Bug
Python Hashlib & A True Story of One BugPython Hashlib & A True Story of One Bug
Python Hashlib & A True Story of One Bug
 
Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
 
Porting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsPorting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability Systems
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applications
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop Automation
 
First adventure within a shell - Andrea Telatin at Quadram Institute
First adventure within a shell - Andrea Telatin at Quadram InstituteFirst adventure within a shell - Andrea Telatin at Quadram Institute
First adventure within a shell - Andrea Telatin at Quadram Institute
 

Recently uploaded

GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 

Recently uploaded (20)

GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 

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