Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Migration

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-07-2007, 02:00 PM
Senior Member
 
Posts: 51
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
Reply With Quote
  #2 (permalink)  
Old 12-07-2007, 03:17 PM
Senior Member
 
Posts: 51
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
Reply With Quote

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0