Empty mail queue in exim

Back

So you have a lot of mails in the mail queue, from f.e spam accounts?
First check how many mails are in the queue with the command:

# exim -bpc


With me it gives an output of 1680 mails, which is too much. 
If you have a lot of spam mails, it can go over 1000 mails in the queue.

Then you can give in this command to see the sender and receiver of the mails:

# exim -bp | less


I use the "| less" command, because if you have more than 1000 mails, you can check where most are coming from.
Let's say for example there are a lot of mails in there from info@secure-paypal.com.

This is the way to empty all mails from that specific address:

# grep -lr 'info@secure-paypal.com' /var/spool/exim/input/ | sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm


Now check the mail queue again with the command:

# exim -bpc


You should have less mails than before!


Sales

Contact our Sales Team for Customised Quote:

sales[@]host-palace.com
Send Email to HostPalace Web Solution Private Limited Sales

Support

Email our support team, We're here to help 24x 7x 365:

support[@]host-palace.com
Send Email to HostPalace Web Solution Private Limited Support

Updates

Follow us throughout the web and stay Updated with the latest news:

Mobile App

Download HostPalace Mobile App to access your Services/Tickets from Mobile.

HostPalace