#!/bin/sh
#batchadduser.sh: batch add mail user.
#install step.
#chmod u+x batchadduser
#./batchadduser.sh domain datafile
if [ $# -lt 2 ]
then
echo "usage: $0 domain datafile"
exit 1
fi
domain=$1
datafile=$2
addcmd=/home/vpopmail/bin/vadduser
while read username passwd
do
$addcmd $username@$domain $passwd
done < $datafile
////////////data file格式//////////////////////////////
test test
////////////////////////////////////////////
本文地址:http://com.8s8s.com/it/it34708.htm