Results 1 to 5 of 5

Thread: [SOLVED] User Provisioning in Zimbra via SOAP using Perl

Threaded View

  1. #1
    Join Date
    Sep 2009
    Rep Power

    Default [SOLVED] User Provisioning in Zimbra via SOAP using Perl

    For the past several weeks I have been looking on the internet for, but unable to find, some information on how to perform user provisioning tasks in Zimbra via SOAP/Perl.

    Attached is a Perl script that contains several subroutines that allow easy manipulation of a Zimbra server using only the perl modules that were supplied with the Zimbra installation. To setup the script, modify these variables to match your Zimbra server:

    my $zimbraAdmin = "admin";
    my $zimbraPasswd = "z1mbra";
    my $mh = "";
    To retrieve either just the Zimbra ID or a complete listing of all of the attributes associated with a specific user account, call one of the following subroutines:

    get_zimbra_id($mailAcct) # Returns Zimbra ID as a scalar variable

    get_account($mailAcct) # Prints all account information
    To create a new account, call the following subroutine with the new account name, a password, the users name, and an employee number (this is the primary key of our personnel database, not necessary for normal Zimbra operation):

    create_account($newAcct,$newPasswd,$newgivenName,$ newsn,$newdispName,$newempNum)
    To modify an existing account, call the following subroutine with the account name, the attribute to be modified and the new attribute value:

    The policy in our organization is to disable (lock) accounts after a user disappears from our personnel database. A locked account will still receive any email sent to it, however, the user will not be able to log in and retrieve these messages. After a period of 90 days, the account is then closed (mail sent will bounce back to sender) and the admin is notified to archive and remove the account from Zimbra.

    disable_account($disAcct) # Account locked, still visible in GAL

    close_account($disAcct) # Account closed, no longer visible in GAL
    If the user reappears in our personnel database, we simply call the following subroutine and the existing account is restored to an active state:

    enable_account($disAcct) # Reenable a locked or closed account
    Hopefully, these subroutines will help someone trying to accomplish a similar task...
    Attached Files Attached Files
    Last edited by mikewhitton; 09-22-2010 at 05:31 AM.

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 09:06 AM
  2. Recover the mail after the crash HDD
    By MrSnaKe in forum Administrators
    Replies: 3
    Last Post: 12-02-2009, 03:38 AM
  3. [SOLVED] Zimbra logwatch.
    By nishith in forum Administrators
    Replies: 5
    Last Post: 06-10-2009, 04:42 PM
  4. Upgrade to ZCS 5.10
    By blozancic in forum Installation
    Replies: 0
    Last Post: 10-21-2008, 08:03 AM
  5. Services stopped working
    By lilwong in forum Administrators
    Replies: 4
    Last Post: 08-15-2006, 09:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts