Sunday, May 20, 2007

How to remove the mails from exim mail queue based on certain keywords ( cPanel specific )

How to remove the mails from exim mail queue based on certain keywords, especially in a cPanel. Below command will help in that and is for cPanel server. Matter of seconds for a seasoned admin, but posting so that I can copy and paste in future.

find /var/spool/exim/input -type f | xargs grep -l 'search_keywords' | xargs rm -frv

1 comment:

Anonymous said...

Thank you so much, this is the only one that worked for my issue, i have tried using exipick but didnt work and other search word arguments but yours is the only one that did the trick... thanks again