Join to Get Free Linux Server Hacks & cPanel Tips

Useful Exim CheatSheet for Devs and System Administrators

Useful Exim CheatSheet for Devs and System Administrators
4.8 (95%) 4 votes

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


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]

Search the queue for a specific destiny user

exiqgrep -r [user]

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. If you have any more exim commands to add, please use the comment form below and we will add the content to the post.

Further reading: