how to delete the all list in Mail Queue Administration easily?

seachen

Verified User
Joined
Feb 3, 2007
Messages
491
i found out that my server Mail Queue Administration inside have too many user spam mail.

may i know how to delete those process ID with 1 click?

thank you.
 
If you want to clean your mail queue, just do "cd /var/spool/exim/input && ls | xargs rm -rf"
 
proHSP, you've made a critical error because exim has multiple files for each email in the queue, in two directories, /var/spool/exim/input and /var/spool/exim/msglog, and a database in /var/spool/exim/db

seachen, you've created some inconsistencies by following the advice. I'm not able to suggest how to clean those inconsistencies because I don't have a queue I want to experiment with.

Here's the right way to empty the queue of all email:
Code:
cd /var/spool/exim/input && ls | xargs exim -Mrm

What proHSP's code does is deletes only part of the email. So after doing the above I'd try the following to resolve the inconsistencies, though I can't guarantee it will work completely:
Code:
service exim stop
killall exim
killall -9 exim
cd /var/spool/exim/input
ls | xargs rm -f
cd /var/spool/exim/msglog
ls | xargs rm -f
service exim restart
Jeff
 
Or just try:
Code:
exim -bp | awk '{print $3}' | xargs exim -Mrm
 
Martynas, will that find all the files in both dirctories, and also in the db directory?

Jeff
 
Back
Top