Useful Exim Commands

Here are some useful CLI commands when dealing with mail queues on EXIM:

 

List amount of messages in the queue

/usr/sbin/exim -bpc

 

List all messages in the queue

/usr/sbin/exim -bp

 

Get a summary of the current mail queue

/usr/sbin/exim -bp | exiqsumm

Here is an example output

Count  Volume  Oldest  Newest  Domain
—–  ——  ——  ——  ——

    1    20KB      4m      4m  domain1.co.uk
    2   144KB      2h      4m  domain2.co.uk
    1    63KB      0m      0m  domain3.co.uk
  374   473MB     21h      3m  gmail.com
    1    31KB      0m      0m  domain4.co.uk
  200   254MB     21h      4h  hotmail.com
    1    2048      4m      4m  domain5.co.uk
    1    47KB      2h      2h  domain6.co.uk
    1   262KB     11m     11m  domain7.co.uk
   50  1216KB     49h      0m  domain8.co.uk
    1    76KB      3m      3m  domain9.co.uk
    1   111KB      6m      6m  domain11.co.uk
    8    7954     45m      0m domain12.co.uk
    1    6041     38m     38m  domain13.co.uk
    2    4198      4m      4m  domain14.co.uk
—————————————————————
  645   729MB     49h      0m  TOTAL

 

To push the whole mail queue

/usr/sbin/exim -qf

 

To remove a particular message from the mail queue

/usr/sbin/exim -Mrm {message_id}

 

To force delivery of one specific message

/usr/sbin/exim   -M   {message_id}

 

To view the header of a particular message

/usr/sbin/exim  -Mvh  {message_id} 

 

View the body of a particular message

/usr/sbin/exim  -Mvb  {message_id}