cpanel delete all email accounts

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

Leave a Reply

Your email address will not be published. Required fields are marked *