Results 1 to 4 of 4

Thread: CSV files and scripting...

  1. #1
    thunder04 is offline Special Member
    Join Date
    Dec 2007
    Location
    Stockton, CA
    Posts
    164
    Rep Power
    7

    Default CSV files and scripting...

    Hi All,

    Please forgive me if this has already been discussed and feel free to redirect me to an existing thread!

    I absolutley LOVE Zimbra. I work for the Menlo Park City School District and am really pushing Zimbra for our district. We currently use a plain ol' OS X Server to do mail (and it's been having MAJOR problems this past week...IMAP database corruption to be the latest fiasco).

    Anyway, I'm setting up Zimbra and our OS X mail server to run side by side via the nifty imapsync tool (and having Zimbra send all mail through the OS X server) until we're ready to officially switch over. However, I need help automating this process!

    I have a CSV file of all our users formatted in this way:

    "username","password","First Name","Last Name"

    I want to set up a script that'll allow me to pull from this CSV file when creating all our user accounts, as well as when imapsync runs.

    I've got the basic command down, but I just don't know what type of loop to put it in, or how to create an array that'll grab the information from my CSV file.

    zmprov createAccount $username@mpcsd.org password displayName '$firstname $lastname' givenName $firstname sn $lastname

    (no password needs to be passed to Zimbra as all authentication is done via Active Directory)

    and...

    imapsync --buffersize 8192000 --nosyncacls --subscribe --syncinternaldates --host1 mail.mpcsd.org --user1 $username@mpcsd.org --password1 $password --host2 zimbra.mpcsd.org --user2 $username@mpcsd.org --password2 $password --noauthmd5

    I saw the Perl script in the Zimbra Wiki, but got a little confused. Any help would be greatly appreciated!

    Thanks!

    ~ Anthony

  2. #2
    thunder04 is offline Special Member
    Join Date
    Dec 2007
    Location
    Stockton, CA
    Posts
    164
    Rep Power
    7

    Default

    Boy, I feel rather dumb...

    This takes care of the imapsync question:

    User Migration - Zimbra :: Wiki

    I still have the question about the bulk user adding with a CSV file.

    Thanks again!

    ~ Anthony

  3. #3
    ceefus is offline Active Member
    Join Date
    Sep 2008
    Posts
    29
    Rep Power
    6

    Default

    I know this post is very old but I created a script that does just what you asked. If you or anyone else would like I can message you the script.

  4. #4
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,568
    Rep Power
    57

    Default

    Quote Originally Posted by ceefus View Post
    I know this post is very old but I created a script that does just what you asked. If you or anyone else would like I can message you the script.
    It might be easier if you posted it in the Zimbra :: Wiki with a link to it in these forums.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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