Thursday, July 12, 2012

Disable 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 -p -s -w -i -r $address
done 
Usage ./[the_above_script]/[domain]

No comments:

Post a Comment