Clear e-mail server queue Print

  • 0

This is the procedure to use when one of your accounts has been compromised, a spammer has flooded your mail queue, and you want to entirely clear it out.

 

Sendmail:

Via SSH, run these commands:

find /var/spool/clientmqueue -type f -delete
find /var/spool/mqueue -type f -delete

Postfix:

Via SSH, run this command:

postsuper -d ALL

Exim:

Via SSH, run this command:

exim -bp |grep "<" |awk {'print $3'} |xargs exim -Mrm

QMail:

Stop the QMail service first.  If QMail runs via xinetd (i.e. in the case of Plesk) you can skip this step.

Via SSH, run the following:

service qmail stop
for i in bounce info intd local mess remote todo; do
find /var/qmail/queue/$i -type f -exec rm {} \;
done
service qmail start

SmarterMail:

Login via RDP.  Stop the SmarterMail service.

Rename the spool directory, i.e. C:\SmarterMail\Spool -> C:\SmarterMail\Spool.bak

Start the SmarterMail service.  Delete the old spool directory at your convenience.

 

MailEnable:

Login via RDP.  Stop the MailEnable Postoffice, MTA, and SMTP services.

Rename the Inbound and Outgoing queue directories, i.e.:

C:\Program Files (x86)\Mail Enable\Queues\SMTP\Inbound -> C:\Program Files (x86)\Mail Enable\Queues\SMTP\Inbound.bak

C:\Program Files (x86)\Mail Enable\Queues\SMTP\Outgoing -> C:\Program Files (x86)\Mail Enable\Queues\SMTP\Outgoing.bak

Re-create the Inbound and Outgoing directories.  Under each, create a sub-directory called "Messages".

Start the above MailEnable services.  Delete the old queue directories at your convenience.


Was this answer helpful?

« Back