How to delete messages from the Sendmail queue

First check the size of the queue:

# mailq | tail -n 1
Total requests: 35971

Use this command to delete the mess:

find . -name "[d,q,Q,D]f*" -exec grep -nil "[email protected]" {} \; | xargs rm

Reference

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top