SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline
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!

Mais conteúdo relacionado

Mais procurados

コンテナ基盤であるLXC/LXDを 本番環境で運用する話
コンテナ基盤であるLXC/LXDを 本番環境で運用する話コンテナ基盤であるLXC/LXDを 本番環境で運用する話
コンテナ基盤であるLXC/LXDを 本番環境で運用する話
Nobuhiro Fujita
 
はまる!!JPA #glassfish_jp #javaee
はまる!!JPA #glassfish_jp #javaeeはまる!!JPA #glassfish_jp #javaee
はまる!!JPA #glassfish_jp #javaee
Toshiaki Maki
 

Mais procurados (20)

次世代の高速メモリストレージ利用に向けたソフトウェアのモダナイゼーション
次世代の高速メモリストレージ利用に向けたソフトウェアのモダナイゼーション次世代の高速メモリストレージ利用に向けたソフトウェアのモダナイゼーション
次世代の高速メモリストレージ利用に向けたソフトウェアのモダナイゼーション
 
第31回「今アツい、分散ストレージを語ろう」(2013/11/28 on しすなま!)
第31回「今アツい、分散ストレージを語ろう」(2013/11/28 on しすなま!)第31回「今アツい、分散ストレージを語ろう」(2013/11/28 on しすなま!)
第31回「今アツい、分散ストレージを語ろう」(2013/11/28 on しすなま!)
 
20191105 AWS Black Belt Online Seminar Amazon Route 53 Hosted Zone
20191105 AWS Black Belt Online Seminar Amazon Route 53 Hosted Zone20191105 AWS Black Belt Online Seminar Amazon Route 53 Hosted Zone
20191105 AWS Black Belt Online Seminar Amazon Route 53 Hosted Zone
 
【EX/QFX】JUNOS ハンズオントレーニング資料 EX/QFX シリーズ サービス ゲートウェイ コース
【EX/QFX】JUNOS ハンズオントレーニング資料 EX/QFX シリーズ サービス ゲートウェイ コース 【EX/QFX】JUNOS ハンズオントレーニング資料 EX/QFX シリーズ サービス ゲートウェイ コース
【EX/QFX】JUNOS ハンズオントレーニング資料 EX/QFX シリーズ サービス ゲートウェイ コース
 
What's New in MySQL 5.7 InnoDB
What's New in MySQL 5.7 InnoDBWhat's New in MySQL 5.7 InnoDB
What's New in MySQL 5.7 InnoDB
 
Amazon s3へのデータ転送における課題とその対処法を一挙紹介
Amazon s3へのデータ転送における課題とその対処法を一挙紹介Amazon s3へのデータ転送における課題とその対処法を一挙紹介
Amazon s3へのデータ転送における課題とその対処法を一挙紹介
 
AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)
AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)
AWS Black Belt Techシリーズ Amazon Relational Database Service (RDS)
 
Spring Boot and Spring Cloud Inside NissanConnect at SPRING FEST '19
Spring Boot and Spring Cloud Inside NissanConnect at SPRING FEST '19Spring Boot and Spring Cloud Inside NissanConnect at SPRING FEST '19
Spring Boot and Spring Cloud Inside NissanConnect at SPRING FEST '19
 
【改訂版あり】クラウド・ネイティブ時代に最適なJavaベースのマイクロサービス・フレームワーク ~ Helidonの実力を見極めろ!
【改訂版あり】クラウド・ネイティブ時代に最適なJavaベースのマイクロサービス・フレームワーク ~ Helidonの実力を見極めろ!【改訂版あり】クラウド・ネイティブ時代に最適なJavaベースのマイクロサービス・フレームワーク ~ Helidonの実力を見極めろ!
【改訂版あり】クラウド・ネイティブ時代に最適なJavaベースのマイクロサービス・フレームワーク ~ Helidonの実力を見極めろ!
 
從「會動就好」到「持續營運」[2023/06/24] @Agile.Taichung
從「會動就好」到「持續營運」[2023/06/24] @Agile.Taichung從「會動就好」到「持續營運」[2023/06/24] @Agile.Taichung
從「會動就好」到「持續營運」[2023/06/24] @Agile.Taichung
 
AWS Black Belt Online Seminar - Amazon Lightsail
AWS Black Belt Online Seminar - Amazon Lightsail AWS Black Belt Online Seminar - Amazon Lightsail
AWS Black Belt Online Seminar - Amazon Lightsail
 
VPC Reachability Analyzer 使って人生が変わった話
VPC Reachability Analyzer 使って人生が変わった話VPC Reachability Analyzer 使って人生が変わった話
VPC Reachability Analyzer 使って人生が変わった話
 
今だから!Amazon CloudFront 徹底活用
今だから!Amazon CloudFront 徹底活用今だから!Amazon CloudFront 徹底活用
今だから!Amazon CloudFront 徹底活用
 
ドメイン駆動設計 本格入門
ドメイン駆動設計 本格入門ドメイン駆動設計 本格入門
ドメイン駆動設計 本格入門
 
OSS+AWSでここまでできるDevSecOps (Security-JAWS第24回)
OSS+AWSでここまでできるDevSecOps (Security-JAWS第24回)OSS+AWSでここまでできるDevSecOps (Security-JAWS第24回)
OSS+AWSでここまでできるDevSecOps (Security-JAWS第24回)
 
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
 
コンテナ基盤であるLXC/LXDを 本番環境で運用する話
コンテナ基盤であるLXC/LXDを 本番環境で運用する話コンテナ基盤であるLXC/LXDを 本番環境で運用する話
コンテナ基盤であるLXC/LXDを 本番環境で運用する話
 
はまる!!JPA #glassfish_jp #javaee
はまる!!JPA #glassfish_jp #javaeeはまる!!JPA #glassfish_jp #javaee
はまる!!JPA #glassfish_jp #javaee
 
ブレソルでテラバイト級データのALTERを短時間で終わらせる
ブレソルでテラバイト級データのALTERを短時間で終わらせるブレソルでテラバイト級データのALTERを短時間で終わらせる
ブレソルでテラバイト級データのALTERを短時間で終わらせる
 
AWS Black Belt Online Seminar Amazon Aurora
AWS Black Belt Online Seminar Amazon AuroraAWS Black Belt Online Seminar Amazon Aurora
AWS Black Belt Online Seminar Amazon Aurora
 

Semelhante a 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
 
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
 
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
 

Semelhante a 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
 

Último

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 

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