• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Doubt

DiegoAlves

New Pleskian
Guys, how are you?
I'm having the following problem:
Tenhos multiple email accounts (more than 600) that needs cleaning / delete.
Not all domain accounts.
The particularity is that I have these accounts begin with numbers.

Thanks.
 
What about using /usr/local/psa/bin/mail CLI utility. Use script something like:

for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select concat(mail.mail_name,"@",domains.name) as address from mail,domains,accounts where mail.dom_id=domains.id and mail.account_id=accounts.id order by address"`; do /usr/local/psa/bin/mail -r $i;done

It will remove all mail accounts for all domain.
 
Back
Top