I tried the solution however the the mailq is still holding old mail. Any other possibilities?
Main Topics
Browse All TopicsHow can i force QMAIL to send all the old messages out in the queue?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
My guess is that your queue messages are junk that cannot be delivered (is being rejected by the receiving host). I would say you have 3 options:
1) Just let the message(s) die their natural death (after /var/qmail/control/queueli
2) Temporarily reduce the value in /var/qmail/control/queueli
3) You can be REALLY anal about it and just manually clear the queue. There is a script available online, but it boils down to:
#! /bin/ksh
echo Cleaning Queue
# remove the lock file so there is no access to the queue while we're meddling
mv /var/qmail/queue/lock /root/
# remove ALL files out of the queue -- careful, this may take a while!
find /var/qmail/queue -type f -exec rm -f {} \;
# restore the lock file so we can queue/de-queue files again
mv /root/lock /var/qmail/queue/
QMail actually usually does a very good job of keeping the queue clean... if you've got a lot of dead messages in there, you may be accidentally acting as an OPEN RELAY (and are getting a lot of SPAM run through you), or one of your users may have a worm/virus infection spreading SPAM. There is a FREE check for open-relay mail systems at http://www/spamhelp.org/sh
If there are a lot of messages stuck in there, you may want to GREP them for the sender and look to that user for why mail is backing up.
I hope this helps!
Dan
IT4SOHO
Business Accounts
Answer for Membership
by: jar3817Posted on 2009-01-28 at 19:28:14ID: 23494093
1. Run the qmail-tcpok binary
# /full/path/to/qmail-tcpok
2. Find the PID of the qmail-send process:
# ps -ef | grep qmail-send
3. Send an alarm signal to that process (pid is the process id found in step 2):
# kill -s ALRM pid
After that the qmail-send process will try to empty the mail queue.