Useful Exim Commands with examples
Exim is a mail transfer agent (MTA) for UNIX and Linux systems, which is responsible for receiving, routing, and delivering e-mail messages.
1) To get the message count in the queue
exim -bpc OR exim -bpr | grep "<" | wc -l
2) To list the messages in the queue
exim -bp
3) To get the summary of messages in the queue (count, volume, oldest, newest, domain, and totals)
exim -bp | exiqsumm
4) To view the header part of the message
exim -Mvh <message-id>
5) To view the body of the message
exim -Mvb <message-id>
6) To remove a message from the queue
exim -Mrm <message-id>
7) To force delivery message
exim -M <message-id>
8) To know the number of frozen emails in a queue
exim -bpr | grep frozen | wc -l
9) To delete the frozen mails from the queue
exim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm OR exiqgrep -z -i | xargs exim -Mrm
10) To see the logs of a message in exim server
exim -Mvl <message-id>