Exim Cheatsheet

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

Syntax:

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

Where:

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

Shows active connections being handled.

exiwhat

Shows a list of all running exim processes

ps -C exim wwwu

This command shows a list of files being accessed by Exim

lsof -c exim

Shows paths of the sending scripts

grep cwd=/ /var/log/exim_mainlog | cut -d = -f 2 | cut -d " " -f 1 | sort | uniq -c | sort -n

Read message header

exim -Mvh (eximID)