This are some useful basic exim commands, compiled into what we call ‘Exim CheatSheet’. This are super useful to manage exim and troubleshoot general email errors from the Linux terminal.
Top 17 Useful Exim Commands
List all messages in the exim mail queue
exim -bp
Get the total number of emails in the queue
exim -bpc
Show a summary of each mail in the queue (eg. domain, # of mails, time in queue, size, etc)
exim -bp | exiqsumm
Delete a specified mail by ID
exim -Mrm '<mail id>'
Freeze an email:
exim -Mf '<mail id>'
Process an email:
exim -M '<mail id>'
Remove all frozen messages:
exiqgrep -z -i | xargs exim -Mrm
Print on screen what exim is doing on this moment
exiwhat
Run a traceroute against en email address
exim -bt '<mail id>'
Check email headers:
exim -Mvh '<mail id>'
Show the body of the message
exim -Mvb '<mail id>'
Check an email ID log
exim -Mvl '<mail id>'
Force exim mail queue
exim -qff
Search for a specific email user
exiqgrep -f [user]@domain.com
Search the queue for a specific destiny user
exiqgrep -r [user]@domain.com
Remove all messages from exim mail queue
exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | sh
rm /var/spool/exim/input/*
That’s all, hope you like our exim cheatsheet.
And here there are a few more deep explained tips regarding Exim:
Further readings: