0.0
The project is in a healthy, maintained state
Zimbra Soap Librairy using SOAP Json interface
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

zm-ruby-client

Library to interface with Zimbra simply.

Author: Maxime Désécot maxime.desecot@gmail.com

Installation

OS: Linux distribution LTS

Language: Ruby2.7+

gem install zm-ruby-client

Examples of uses:

Connection:

admin = Zm::Client::Cluster.new(Zm::Client::ClusterConfig.new('config.json'))
admin.login

or

config = Zm::Client::ClusterConfig.new do |cc|
  cc.zimbra_admin_host = 'mail.domain.tld'
  cc.zimbra_admin_scheme = 'https'
  cc.zimbra_admin_port = 443
  cc.zimbra_admin_login = 'admin@domain.tld'
  cc.zimbra_admin_password = 'secret'
end
admin = Zm::Client::Cluster.new(config)
admin.login

List all accounts

filter = '(&(mail=*@domain.tld)(zimbraLastLogonTimestamp<=20190225000000Z))'
accounts = admin.accounts.where(filter).all

Find an account

account = admin.accounts.find_by name: 'maxime@domain.tld'

Create an account

account = Zm::Client::Account.new(admin) do |acc|
  acc.name = 'maxime@domain.tld'
end
account.zimbraMailQuota = 0
account.save