Thursday, July 12, 2012

Enable All Services For A Domain Using Vpopmail

domain=$1
vpmdir=/home/vpopmail
acctlist=$(find $vpmdir/domains/$domain -mindepth 1 -maxdepth 1 -type d) for acctpath in $acctlist; 
do
     account=${acctpath##*/}
     address=$account@$domain
     echo "changing $address"
     $vpmdir/bin/vmoduser -x $address
done 
Usage ./[the_above_script]/[domain]