Deleting email from mail queue

I had the need to delete all bounce messages in a sendmail mail queue, so I used the following

find /var/spool/mqueue -name '*' -type f |xargs grep -l "User unknown" |xargs rm
Did you like this? Share it:

No related posts.



Leave a Reply

You must be logged in to post a comment.