delete all email in exim

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

exim -bp

To remove a message from the queue, enter:

exim -Mrm {message-id}

To remove all messages from the queue, enter:

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

To remove all messages from the queue with specific word, enter:

exim -bp|grep “username”| awk {‘print $3’}| xargs exim -Mrm

Trackback

no comment untill now

Sorry, comments closed.