exim -bpc2. Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient):
exim -bp3. Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals):
exim -bp | exiqsumm4. Print what Exim is doing right now:
exiwhat5. Testing how e-mail address is pointed:
exim -bt [email protected]6. Run a pretend SMTP transaction from the command line, as if it were coming from the given IP address. This will display Exim's checks, ACLs, and filters as they are applied. The message will NOT actually be delivered:
exim -bh XXX.XXX.XX.XX7. Display all of Exim's configuration settings:
exiqgrep -f @domain2. Use -r to search the queue for messages for a specific recipient/domain:
exiqgrep -r @domain
3. Use -o to print messages older than the specified number of seconds. For example, messages older than 1 day:
exiqgrep -o 86400 [...]
4. Use -y to print messages that are younger than the specified number of seconds. For example, messages less than an hour old:
exiqgrep -y 3600 [...]
5. Use -s to match the size of a message with a regex. For example, 700-799 bytes:
exiqgrep -s '^7..$' [...]
Use -z to match only frozen messages, or -x to match only unfrozen messages. There are also a few flags that control the display of the output.
6. Use -i to print just the message-id as a result of one of the above two searches:
exiqgrep -i [ -r | -f ] ...
7. Use -c to print a count of messages matching one of the above searches:
exiqgrep -c ...
8. Print just the message-id of the entire queue:
1. Start a queue run
exim -q -v
2. Start a queue run for just local deliveries:
exim -ql -v
3. Remove a message from the queue:
exim -Mrm <message-id> [ <message-id> ... ]
4. Freeze a message:
exim -Mf <message-id> [ <message-id> ... ]
5. Throw a message:
exim -Mt <message-id> [ <message-id> ... ]
6. Deliver a message, whether it's frozen or not, whether the retry time has been reached or not:
exim -M <message-id> [ <message-id> ... ]
7. Deliver a message, but only if the retry time has been reached:
exim -Mc <message-id> [ <message-id> ... ]
8. Force a message to fail and bounce as "cancelled by administrator":
exim -Mg <message-id> [ <message-id> ... ]
9. Remove all frozen messages:
exiqgrep -z -i | xargs exim -Mrm
10. Remove all messages older than five days (86400 * 5 = 432000 seconds):
exiqgrep -o 432000 -i | xargs exim -Mrm
11. Freeze all queued mail from a given sender:
exiqgrep -i -f [email protected] | xargs exim -Mf
12. View a message's headers:
exim -Mvh <message-id>
13. View a message's body:
exim -Mvb <message-id>
14. View a message's logs:
exim -Mvl <message-id>
exigrep '<= .* \[126.96.36.199\] ' /path/to/exim_log2. search for messages sent to a particular IP address:
exigrep '=> .* \[188.8.131.52\] ' /path/to/exim_logThis is how you search for outgoing messages with the “=>” symbol that are sent to “[email protected]”. The pipe to grep for the “<=” symbol will only match lines containing information on the sender, the From address, the sender’s IP address, the message size, the message ID, and the subject line if you have enabled logging the subject.
eximstats /path/to/exim_mainlog4. Same as above, with less verbose output:
eximstats -ne -nr -nt /path/to/exim_mainlog5.To delete all queued messages containing a certain string in the body:
grep -lr 'a certain string' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
It looks like you're new here. If you want to get involved, click one of these buttons!
Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!