Get user list:
\ls /home/cpanel_user/mail/domain.com/ > /tmp/list
for i in `cat /tmp/list`; do cpapi2 --user=cpanel_user Email delpop domain=domain.com email=$i; done
cpanel delete all email accounts
Leave a reply
Get user list:
\ls /home/cpanel_user/mail/domain.com/ > /tmp/list
for i in `cat /tmp/list`; do cpapi2 --user=cpanel_user Email delpop domain=domain.com email=$i; done