Qmail, clearing the queue
From FreeBSDwiki
(Difference between revisions)
(5 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | + | If you've done something unfortunate and wedged your mailserver with more messages queued up than it can handle, you may need to just get rid of everything in its queue to recover. | |
− | + | To delete '''all''' messages from the queue, you'll first need to stop it, then use the [[find]] command to help you clean it out, then restart it: | |
− | + | server# '''/usr/local/etc/rc.d/qmail.sh stop''' | |
+ | server# '''cd /var/qmail/queue && find intd todo local remote mess info bounce -type f -print |xargs rm''' | ||
+ | server# '''/usr/local/etc/rc.d/qmail.sh start''' | ||
− | [[Category:Common Tasks]] | + | Start qmail back up, and the queue should be empty. Note that if you only wanted to clear out bounce messages (a fairly frequent cause of mailservers getting wedged) you could abbreviate the '''find''' part of the sequence above like so: |
+ | |||
+ | server# '''cd /var/qmail/queue && find bounce -type f -print |xargs rm''' | ||
+ | |||
+ | see also: [[Qmail, flushing the queue]], [[Qmail, monitoring the queue]] | ||
+ | |||
+ | [[Category:Common Tasks]][[Category:Qmail]] |
Latest revision as of 11:34, 21 June 2007
If you've done something unfortunate and wedged your mailserver with more messages queued up than it can handle, you may need to just get rid of everything in its queue to recover.
To delete all messages from the queue, you'll first need to stop it, then use the find command to help you clean it out, then restart it:
server# /usr/local/etc/rc.d/qmail.sh stop server# cd /var/qmail/queue && find intd todo local remote mess info bounce -type f -print |xargs rm server# /usr/local/etc/rc.d/qmail.sh start
Start qmail back up, and the queue should be empty. Note that if you only wanted to clear out bounce messages (a fairly frequent cause of mailservers getting wedged) you could abbreviate the find part of the sequence above like so:
server# cd /var/qmail/queue && find bounce -type f -print |xargs rm
see also: Qmail, flushing the queue, Qmail, monitoring the queue