npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

zimbra-client

v0.2.0

Published

NodeJS client for Zimbra SOAP interface

Readme

zimbra-client

Overview

zimbra-client is a Node.js module that implements a SOAP client for Zimbra SOAP API

Features

So far this module supports 5 methods

  • getAdminAuthToken
  • createAccount
  • adminRequest
  • mailRequest
  • createDomain
  • getUserAuthToken
  • getFolder
  • getCalendars
  • searchAppointments
  • getMessage

Usage

Following example demonstrates creating a new Zimbra account using zimbra-client. In this example, the code assumes Zimbra is running on localhost, admin username is "admin" and admin password is "test123"

Example 1: Creating a new account

zimbra = require("zimbra-client");
zimbra.getAuthToken("localhost", "admin", "test123",
    function(err, authToken) {
        if(err != null) {
            console.log(err.message);
        }
        zimbra.createAccount("localhost",{sn:"Solovyev",givenName:"Greg",displayName:"Greg Solovyev",password:"test123",name:"[email protected]"},authToken,
            function(err1,accountObj) {
                if(err1 != null) {
                    if(err1.code == "account.ACCOUNT_EXISTS") {
                        console.log("an account with this name already exists");
                    } else {
                        console.log(err1.message);
                    }
                } else {
                    console.log("new account ID" + accountObj.id);
                }
            }
        );
    })

Example 2: Creating a domain

zimbra = require("zimbra-client");
zimbra.getAuthToken("localhost", "admin", "test123",
    function(err, authToken) {
        if(err != null) {
            console.log(err.message);
        } else {
            zimbra.createDomain("localhost", "gregs-mbp2.local", {description:"test domain"}, authToken,
                function (err1, respObj) {
                    if (err1 != null) {
                        if (err1.code == "account.DOMAIN_EXISTS") {
                            console.log("Domain with this name already exists");
                        } else {
                            console.log(err1.message);
                        }
                    } else {
                        console.log("response object: " + JSON.stringify(respObj));
                    }
                });
        }
    });

Example 3: Sending a custom admin SOAP request

zimbra = require("zimbra-client");
zimbra.getAuthToken("localhost", "admin", "test123",
    function(err, authToken) {
        if(err != null) {
            console.log(err.message);
        } else {
        zimbra.adminRequest("localhost", "GetAllAdminAccountsRequest", {}, authToken,
            function (err1, respObj) {
                if(err1 != null) {
                    console.log(err1.message);
                } else {
                    console.log("response object: " + JSON.stringify(respObj));
                }
            });
       }
    });
    

Example 4: Chain domain and account creation

var ZIMBRA_HOST = "localhost";
var ADMIN_LOGIN = "admin";
var ADMIN_PWD = "test123";
var domain = "testdomain.com";
var userEmail = "[email protected]";
zimbra = require("zimbra-client");
//get an authtoken
zimbra.getAuthToken(ZIMBRA_HOST, ADMIN_LOGIN, ADMIN_PWD,
function(err, authToken) {
    if(err != null) {
        console.log(err.message);
    } else {
        //create a damain using authtoken passed on by getAuthToken
        zimbra.createDomain(ZIMBRA_HOST, domain, {description:"test domain"}, authToken,
            function (err1, respObj) {
                if (err1 != null) {
                    if (err1.code == "account.DOMAIN_EXISTS") {
                        console.log("Domain with this name already exists");
                    } else {
                        console.log(err1.message);
                    }
                } else {
                    console.log("Created domain: " + respObj.name);
                    //create an account using the same authtoken passed on buy getAuthToken
                    createAccount(ZIMBRA_HOST,{sn:"Solovyev",givenName:"Greg",displayName:"Greg Solovyev",password:"test123",name:userEmail},authToken,
                        function(err1,accountObj) {
                            if(err1 != null) {
                                if(err1.code == "account.ACCOUNT_EXISTS") {
                                    console.log("an account with this name already exists");
                                } else
                                {
                                    console.log(err1.message);
                                }
                            } else {
                                console.log("new account ID" + accountObj.id);
                            }
                        }
                    );
                }
            });
    }
});

License

zimbra-client is licensed under Apache 2. See LICENSE.txt