SolidHost Forums

SolidHost Forums (
-   Tutorials / How to? (
-   -   Some more useful exim commands (

SH-Ramon Mar 6th, 2007 19:20

Some more useful exim commands
Exim Command :-

Below are some useful commands for managing an Exim server.

The message-IDs that Exim uses to refer to messages in its queue are mixed-case alpha-numeric, and take the form of: xXX-YYYY-ZZ. Most commands related to managing the queue and logging use these message-ids.
There are three -- count 'em, THREE -- files for each message in the spool directory. If you're working in these files by hand, instead of using he appropriate exim commands as detailed below, make sure you get them all, and don't leave Exim with long list of messages in the queue.

Files in /var/spool/exim/msglog contain logging information for each message and are named the same as the message-id.

Files in /var/spool/exim/input are named after the message-id, plus a suffix denoting whether it is the envelope header (-H) or message data (-D).

These directories may contain further hashed subdirectories to deal with larger mail queues, so don't expect everything to always appear directly on the top /var/spool/exim/input or /var/spool/exim/msglog directories; any searches or greps will need to be recursive. See if there is a proper way to do what you're doing before working directly on the spool files.

Queues information

1) Print a count of the messages in the queue:

root@localhost# exim -bpc
2) Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient):

root@localhost# exim -bp
3) Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals):

root@localhost# exim -bp | exiqsumm
4) Generate and display Exim stats from a logfile:

root@localhost# eximstats /path/to/exim_mainlog
5) Generate and display Exim stats from a logfile, with less verbose output:

root@localhost# eximstats -ne -nr -nt /path/to/exim_mainlog
6) Generate and display Exim stats from a logfile, for one particular day:

root@localhost# fgrep 2007-02-16 /path/to/exim_mainlog | eximstats
7) Print what Exim is doing right now:

root@localhost# exiwhat
8) To delete frozen emails

exim -bp | awk '$6~"frozen" { print $3 }' | xargs exim -Mrm
9) To deliver emails forcefully

exim -qff -v -C /etc/exim.conf &

Best Regards,
Ramon Coleman,
SolidHost Engineer

mortin Mar 8th, 2007 01:18

Dear Ramon

Thank you for your tips.
It is very helpfull !
Good Works !


All times are GMT +2. The time now is 16:37.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.