Exim Cheatsheet

How to list email count with sender information from the Exim mail queue ?


exim -bp|grep "<"|awk {'print $4'}|cut -d"<" -f2|cut -d">" -f1|sort -n|uniq -c|sort -nr


exim -bp : Is the base command to list all email in the mail queue with its details.

grep “<” : To grep out the Sender address line only.

awk {‘print $4’} : Output only the sender name section.

cut -d”<” -f2|cut -d”>” -f1 : To crop ‘<‘ and ‘>‘

sort -n|uniq -c|sort -nr : To re-arrange and count.

Credit: https://www.crybit.com/count-emails-with-senders/

How to delete frozen messages from the Exim mail queue ?

exiqgrep -z -i | xargs exim -Mrm