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
  #11 (permalink)  
Old 08-31-2009, 06:17 PM
Project Contributor
 
Posts: 74
Default

You may need some trimming on the perl script. From my experience, and while i'm writing this i'm finishing a 600 accounts, 400Gb migration to Zimbra i can say that if you dump a CSV that looks like:

someone@domain.com,password,John,Doe

and follow the instructions, this will work.

well, if you want to use only the username on the CSV, you might be able to hardcode your domain on the script, so that when it creates the entries it uses the domain info you provided.

FAR FAR away from being good on perl, but i THINK something like this would work for you:

#!/usr/bin/perl

# Lookup the valid COS (Class of Service) ID in the interface or like this
my $cosid = `su - zimbra -c 'zmprov gc Default |grep zimbraId:'`;
$cosid =~ s/zimbraId:\s*|\s*$//g;

while (<>) {
chomp;

# CHANGE ME: To the actual fields you use in your CSV file
my ($uid, $password, $first, $last) = split(/\,/, $_, 4);

#my ($uid, $domain) = split(/@/, $email, 2);

print qq{ca $uid\@domain.com $password\n};
print qq{ma $uid\@domain.com zimbraCOSid "$cosid"\n};
print qq{ma $uid\@domain.com givenName "$first"\n};
print qq{ma $uid\@domain.com sn "$last"\n};
print qq{ma $uid\@domain.com cn "$uid"\n};
print qq{ma $uid\@domain.com displayName "$first $last"\n};
print qq{ma $uid\@domain.com zimbraPasswordMustChange TRUE\n};
print qq{\n};
}
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

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.