How to clear the mail queue using a script?

If you want to clear your mail queue, you can create a script named clearmailq.sh with the              following:
Install the following script as a .sh on your server

#####Mail Queue Cleaner#####
#!/bin/bash
echo Clearing Mail Queue..
cd /var/spool/exim/input
rm -rf *
exit

NOTE : Save this, and chmod 755. Now, crontab this script to run, again, there are better ways of doing this!

Share on Twitter
Share on Facebook

BLACK

FRIDAY

DEALS

UP TO 60% OFF
Friday November 27th starts at 9am EST.
While supplies last!