Here’s some handy tips for managing your qmail queue on a linux machine, which can be helpful for debugging:
Clear your Queue
Firstly, stop Qmail from your PLESK control panel in Server > Services, or run this command:
service qmail stop
Now log into a shell terminal (probably via SSH) and then run these commands:
find /var/qmail/queue/mess -type f -exec rm {} ;
find /var/qmail/queue/info -type f -exec rm {} ;
find /var/qmail/queue/local -type f -exec rm {} ;
find /var/qmail/queue/intd -type f -exec rm {} ;
find /var/qmail/queue/todo -type f -exec rm {} ;
find /var/qmail/queue/remote -type f -exec rm {} ;
Once those are finished, just restart your mail server again from PLESK and you’re done! Alternatively run this
service qmail start
View how many messages are in your queue:
Run this command:
/var/qmail/bin/qmail-qstat
And you’ll get something along the lines of:
messages in queue: xxxxxx
messages in queue but not yet preprocessed: x