Deleting sendmail queue
Our monitoring system has gone a bit haywire (my fault), and has started sending me a metric asston of email notifications which should have been suppressed.
Luckily, a few more asstons of emails were queued by sendmail and we were able to delete them before it launched a second offensive.
There are a few ways to view the mail queue.
mailq
sendmail -bp
ll /var/spool/mqueue/
ll /var/spool/clientmqueue
There are also several ways to delete emails from the queue.
sendmail -v -q
Alternatively, the sendmail service can be stopped, all items from /var/spool/mqueue/ and /var/spool/clientmqueue can be deleted, and the sendmail service restarted.
Confirm the queue has been cleared with mailq or one of the other commands.
About this entry
You’re currently reading “Deleting sendmail queue,” an entry on Powered By Apathy
- Published:
- 10.19.09 / 9am
- Category:
- Linux/BSD
- Tags:
No comments
Jump to comment form | comments rss [?] | trackback uri [?]