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 Search this Thread Display Modes
  #1 (permalink)  
Old 12-07-2007, 02:00 PM
Special Member
 
Posts: 103
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
Special Member
 
Posts: 103
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
  #3 (permalink)  
Old 08-04-2010, 03:29 PM
Active Member
 
Posts: 29
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.
Reply With Quote
  #4 (permalink)  
Old 08-05-2010, 12:53 AM
Zimbra Consultant & Moderator
 
Posts: 19,633
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Why Join?

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

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.