Home » WHM/cPanel » Exim Command Line

Exim Command Line

Here is Exim Command Line.

To print a list of the messages in the queue, enter:

# exim -bp

To remove a message from the queue, enter:

# exim -Mrm {message-id}

To remove all messages from the queue, enter:

# exim -bp | awk ‘/^ *[0-9]+[mhd]/{print “exim -Mrm ” $3}’ | bash
# exim -bp | exiqgrep -i | xargs exim –Mrm

Print total messages in the queue

# exim -bp | exiqsumm

Print what Exim is doing currently:

# exiwhat

Searching the queue through exiqgrep

Use -f option to find the queue for messages from a specific sender:

# exiqgrep -f [luser]@domain

Use -r for messages for a specific recipient domain:

# exiqgrep -r [luser]@domain

Use -i to print just the message-id in the queue:

# exiqgrep -i

Print a count of the messages in the queue:

# exim -bpc

Use -o to print messages older than the specified number of seconds. For example, messages older than 2 day:

# exiqgrep -o 86400 […]

Test how exim will route a given address

#exim –bt user@domain.com

Display exim configuration file.

#exim -bP

Use -y to print messages that are younger than the specified number of seconds.
for example 2 hours

# exiqgrep -y 7200 […]

Manage queue
Start a queue run:

#exim -q –v

Start a queue run for just local deliveries:

# exim -ql -v

Remove all frozen messages:

# exiqgrep -z -i | xargs exim -Mrm

Remove all messages older than two days (86400 * 2 = 172800 seconds):

# exiqgrep -o 172800 -i | xargs exim -Mrm

Freeze all queued mail from a given sender:

# exiqgrep -i -f luser@example.com| xargs exim -Mf

View a message’s headers:

# exim -Mvh

View a message’s body:

# exim -Mvb

View a message’s logs:

# exim -Mvl

Edit the sender of a message:

# exim -Mes


I am founder and webmaster of www.linuxpcfix.com and working as a Sr. Linux Administrator (Expertise on Linux/Unix & Cloud Server) and have been in the industry from last 7 years.

Leave a Reply

Your email address will not be published. Required fields are marked *


Time limit is exhausted. Please reload the CAPTCHA.

Categorized Tag Cloud