• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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