#!/usr/bin/perl -w

# Takes a list of usernames from a file and
# calls the migrate mail script for each one

if ($#ARGV < 0) {
	print "Usage: $0 userfile\n";
	print "  Read a list of usernames, one per line, from userfile\n";
	print "  and calls migrate_user_mail.pl for each one\n";
	exit(-1);
}

open (IN, "$ARGV[0]") or die("Could not open '$ARGV[0]' - $!");

while(<IN>) {
	chomp;
	system("/private/tools/migrate_user_mail.pl $_ > /private/tools/logs/log.$_");
}

close(IN);

