December 5, 2021

Remove All messages From the Mail Queue in exim, Remover emails from exim


Remove All messages From the Mail Queue in exim, Remover emails from exim, remove emails from shell

When you using Exim mail server under CentOS Linux or any Linux system.

How do you remove all messages from the Exim mail queue using a shell prompt with one command?

print list of messages in queue

To print a list of the messages in the queue, enter:

# exim -bpc

remove all messages from the queue

To remove a message from the queue, enter:

# exim -Mrm message-id

remove all messages from the queue

To remove all messages from the mail queue, enter: 

 

# exim -bp | awk '/^ *[0-9]+[mhd]/print "exim -Mrm " $3' | bash

I hope you now can solve this problem, also you can  know the page that sent spam emails with the following command.

 How to know the source of the spam:

# grep cwd /var/log/exim_mainlog | grep -v /var/spool | awk -F”cwd=” ‘print $2’ | awk ‘print $1’ | sort | uniq -c | sort -n

Remove All messages From the Mail Queue in exim, Remover emails from exim, remove emails from shell



Source link

Leave a Reply

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