Blogs » Jeff Brown's blog

Exim commands

Change certs to LetsEncrypt
chmod 755 /etc/letsencrypt/{archive,live}; chgrp Debian-exim /etc/letsencrypt/{archive,live}

Check user exim -bt mailmanatispa [dot] org [dot] za

- /etc/exim4/update-exim4.conf.conf (this is a local conf file holding signficant variables which is read by update-exim.conf)
- $ update-exim.conf is a script which must be run after any changes are made to ../conf.d/* or the update-exim4.conf.conf file above.
- After any change, it is preferably to kill -HUP `cat` over service restart/reload (reload seems to only take effect post final q-runner)
- Multi conf works in script numbered priority. Thus, 00-macros is generally the file to edit for custom additions (so it is run first). Note: Editing 00-macros is not always the case Eg. When making changes to routes, transports, ACL's etc...
- $ exim -bP (will display all of exims configuration settings).
- (Craig Vine 18 October 2017)

Helpful Exim Commands:

/usr/sbin/exim -M email-id => Force delivery of one message
/usr/sbin/exim -qf => Force another queue run
/usr/sbin/exim -qff => Force another queue run and attempt to flush the frozen message
/usr/sbin/exim -Mvl messageID => View the log for the message
/usr/sbin/exim -Mvb messageID => View the body of the message
/usr/sbin/exim -Mvh messageID => View the header of the message
/usr/sbin/exim -Mrm messageID => Remove message without sending any error message
/usr/sbin/exim -Mg messageID => Giveup and fail message to bounce the message to the Sender

/usr/sbin/exim -bpr | grep “<” | wc -l =>Number of emails in the que
/usr/sbin/exim -bpr | grep frozen | wc -l => How many Frozen mails on the queue
/usr/sbin/exim -bpr | grep frozen | awk {‘print $3’} | xargs exim -Mrm => Deleteing Frozen Messages

To flush the exim queue:

1. login to your server via ssh as root.

2. Type: exim -qff


mailq | grep frozen | awk '{print $3}' | xargs exim -v -M

View headers / body of message in queue:
exim -Mvh *
exim -Mvb *

exim -Mrm * to remove a message


Add new comment

Total views: 79