exim control tool. Allows to perform administrative tasks using friendly interface. Probably useful for those who cannot remember all these sendmail-like switches.
# eximctl [command] [parameters]
# eximctl version
Exim version 4.82 #0 (FreeBSD 9.2) built 15-Feb-2014 17:56:40
# eximctl status
exim is running as pid 40177.
# eximctl log 1Wa1Xu-000KgD-XX
2014-04-15 13:36:21 Received from [email protected] U=srvx P=local S=38578
# eximctl freeze to fork.pl
1WdGuK-0002pW-Bw [email protected] -> [email protected]
Message 1WdGuK-0002pW-Bw is now frozen
start -- start exim via service
stop -- stop exim via service and SIGTERM + SIGKILL
restart -- stop + start
status -- status
what -- full status
kill -- kill all exim process
alive -- check if exim is alive (report via exitcode)
pids -- list pids of exim processes
top -- exitop (using exim main log)
syntax -- test configuration syntax
reload -- reload config with SIGHUP
version -- show exim version
config [options] -- show config, possible options:
(none) - main config values
config - full active config
config_file - path of used config file
log_file_path
pid_file_path
+named_list - contents of list
router_list
router 'name-of-router'
transport_list
transport 'name-of-transport'
authenticator_list
authenticator 'name-of-authenticator'
environment_list - env variables w/o values
environment - env variables with values
macro_list
macros
mailq -- show the queue
mailqq -- show the queue (brief format)
queue -- show the queue, mailq alias
qsize -- show queue size
qstats -- queue statistics
qgrep <msg spec> -- grep queue (brief format)
flush <msg spec> -- flush queue
flushall -- flush all (including frozen, exim -qff mode)
log <msg spec> -- show log for message
head <msg spec> -- show message header
body <msg spec> -- show message body
contents <msg spec> -- show complete contents (header+body) of message
delete <msg spec> -- delete message from queue (no error sent)
fail <msg spec> -- fail message (bounce)
freeze <msg spec> -- freeze message
thaw <msg spec> -- thaw (unfreeze) message
routing email -- view routing for email
<msg spec> -- specification for message:
- msg id - message id, formatted as xxxxxx-xxxxxx-xx
- [from|to] regexp - regexp to be matched against sender (from, the default) or recipient (to)
- use explicit regexp to match all messages (eg. single dot would match any message)
eximctl looks for eximctl.conf in standard locations (/etc/, /usr/local/etc and directory where eximctl script is stored -- in this particular order). eximctl reads config files from all the locations. Settings are described in default config file. In case no config file exists eximctl uses built-in defaults (same as in the default config file).
It's assumed that all binaries and scripts used by eximctl are available in $PATH.
Following external tools are required:
- exim binary (tested with modern exim 4.x)
- scripts installed with exim (exiqgrep, exiwhat etc.)
- top command uses exitop script, available at https://github.com/mcnewton/exitop . In case exitop is not found in $PATH there is additional configuration option to specify explicit path.
- ps tool (any POSIX compliant version should do but tested only with FreeBSD 9+ base-system version and Linux procps-ng v.3)
- /sbin/service to allow exim daemon management
Marcin Gryszkalis [email protected]