• 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

Clear Mail Queue using SSH

bradz

Regular Pleskian
With Plesk 10.4, can one clear the Mail Queue using SSH without installing software?
The control panel is responding very slowly.
Thanks for any help!
Sincerely,
Brad
 
Look at available options for /usr/local/psa/admin/sbin/mailqueuemng utility.
 
And how do I look at the options of the command? Typing the command puts out the queue, -h, --help, -help or something similar doesn’t work…
 
# /usr/local/psa/admin/sbin/mailqueuemng --help | grep 'delete all messages in the queue'
-D : delete all messages in the queue (local and remote)
 
~# /usr/local/psa/admin/sbin/mailqueuemng --help

/usr/local/psa/admin/sbin/mailqueuemng: unrecognized option `--help'
 
confirming: -h and --help do not work.
Also, would be great to be able to delete by sender or recipient not only by subject.
 
If you have Postfix as MTA, you can use following command:

postsuper -d ALL
 
Back
Top