Qmail is a wonderful MTA in all sense but its quite easy to have the troubles like your queue getting filled up and you don’t know how to flush the queue. I’ll give you some insights how to do that

If you have already downloaded qmHandle you can remove the mails by issuing the command

qmHandle -S'failure notice'

Here we have deleted all the mails with the subject “failure notice” change it as per your needs, but I don’t think qmHandle can work on a busy system and when the queue is quite large. By default qmHandle has to stop qmail first so make sure that qmailctl is correctly mentioned in the qmHandle script just another tip :)

Our installation of qmail was based on qmailrocks and here is the method we followed

You cannot simply stop qmail by issuing qmailctl stop

you need to stop by the command

svc -d /service/*
svc -d /service/*/log

then kill all qmail process

pgrep |xargs kill -9

now go to qmail queue directory

cd /var/qmail/queue/
find mess -type f -exec rm -rf {} ;
find info -type f -exec rm -rf {} ;
find remote -type f -exec rm -rf {} ;

Now enable qmail service

svc -u /service/*
svc -u /service/*/log

now tail the log files

 tail -f /var/log/qmail/qmail-smtpd/current also tail -f /var/log/qmail/qmail-send/current and see how it goes.
VN:F [1.9.6_1107]
Rating: 9.0/10 (5 votes cast)
VN:F [1.9.6_1107]
Rating: 0 (from 0 votes)
Qmail flush stuck queue, 9.0 out of 10 based on 5 ratings
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Live
  • StumbleUpon
  • Twitter
  • Yahoo! Buzz
  • Reddit
  • Technorati