Andrew Averin wrote:

Hi all,
How could I clean qmail queue manually????

Here's a script I use. I call it nukequeueitem. It shuts down send, waits for that to happen, and then nukes the specified items and restarts send.

Call it like this:
./nukequeueitem 123456 2342454 123123
where the numbers after it are the numbers of the queue items you want to nuke.


[ $# -eq 0 ] && exit 1

svc -d /service/qmail-send
echo 'Working ...'
sleep 2s

while ! svstat /service/qmail-send | grep ': down'; do
  echo Still up.
  sleep 2s

for x in $@; do
  echo nuking $x
  find /var/qmail/queue -name ${x} -exec rm {} ';'


svc -u /service/qmail-send
sleep 3s
svstat /service/*

Bill Gradwohl
spamSTOMPER Protected email

Reply via email to