Page 1 of 1

Internet mail gateway queue

Posted: Tue Dec 04, 2007 5:00 pm
by jon@adtec
Hi All

I have an installation where the internet mail gateway queue is now 300 000 messages I think this is mainly because of spam being sent to invalid recipients.... Anyway what I would like to do is to remove / delete mails in this queue. I am not able to do this from the admin console as the queue page just hangs ... cannot handle the load.

Is there a command line script that can be run to remove these?

thanks
Jon

Posted: Wed Dec 05, 2007 3:59 am
by Valerion
omqdump can delete it. It is a protected tool, and you can find the password elsewhere in the forum. I would suggest reading up on it a bit first, it's considered a diagnostics / repair tool and has no safeguards against mistakes built in.

Posted: Wed Dec 05, 2007 6:39 am
by mikethebike
Jon,

you will have difficulty removiong messages from the queue now that it is so large, anything you do will take some time. Any command you do to query the queue, or manipluate the messages will take a while.

When you run "omqstat -t", do you see any "throughput on the unix queue?

I would suggest stopping the gateway first while you process the messages.

Are you sure they are all SPAM? Run "omstat -q unix > /tmp/jon.txt" to get an idea of whats on the queue.

If they do all appear to be SPAM, use omqdump to "D" (delete) messages from the unix queue (I would do it in batches of 500 just in case something goes wrong.

If they are not all spam, and you want to retain some messages, you may wish to use omresub to delete or resubmit messages....although its a bit tricky.....

edit the /tmp/jon.txt file, replacing all the lines you want to keep with "1", and all the lines you want to delete with "2".
Then run:
omresub -q unix -i < /tmp/jon.txt

Mick