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};
}