My Script (the cvs file is in the following format
"Username,Password,Domain," with that extra comma that way I loose the end
of line character)...
Now all I need to do is import mail.
Gilbert
#!/usr/bin/perl
# This is a test script to take users with
# encrypted passwords from IMAIL to QMAIL TOASTER
use Crypt::Imail;
# open the csv file
open(CSV,"passwords.csv") or die "Cannot open passwords.csv!\n";
$im = Crypt::Imail->new();
my $string = <CSV>;
while (<CSV>) {
# create an array
my @list = split (/,/);
# decrypt password
my $password = $im->decrypt(lc"$list[0]",$list[1]);
# print to shell username and password
print "The Password is for $list[0]... $password.\n";
# add the user to the toaster
system ("/home/vpopmail/bin/vadduser", "$list[0]\@$list[2]", "$password");
}
# close the csv file
close(CSV);
---
[ This E-mail was scanned for viruses by Phoenix Internet ]
[ Phoenix Internet
http://www.phoenixinternet.net ]
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss