• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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