Exim4 – Useful commands

In order to work with exim4 – you must be a sudo user on the host machine:

1. Get list of frozen/blocked messages

mailq

2. Remove all messages from mailq

sudo exim4 -Mg `sudo mailq | awk '{ print $3 }'`

3. Remove all Frozen messages from mailq

sudo exim4 -Mg `sudo mailq | grep frozen | awk '{ print $3 }'`

4. View a message’s headers

exim -Mvh <message-id>

5. View a message’s body

exim -Mvb <message-id>

6. Remove a message from queue

exim -Mrm <message-id>

Refer to this useful article to see list of other useful commands: http://bradthemad.org/tech/notes/exim_cheatsheet.php

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s