#! / 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 / vedduser
While Read Username Passwd Do
$ addcmd $ usrname @ $ domain $ passwd
DONE <$ datafile
Data file format ////
Test Test