exiqgrep

Exim mail queue search utility

TLDR

Match sender address (case-insensitive)
$ exiqgrep -f '<[[email protected]]>'
Match sender and display message IDs only
$ exiqgrep -i -f '<[[email protected]]>'
Match recipient address
$ exiqgrep -r '[[email protected]]'
Remove all messages matching sender
$ exiqgrep -i -f '<[[email protected]]>' | xargs exim -Mrm
Test for bounced messages
$ exiqgrep -f '^<>$'
Display count of bounced messages
$ exiqgrep -c -f '^<>$'

SYNOPSIS

exiqgrep [options] [pattern]

DESCRIPTION

exiqgrep is a Perl script for searching the Exim mail queue. It filters queue output by sender, recipient, age, frozen state, and other criteria. At least one selection option or -c must be given.Commonly used with exim -Mrm to remove matching messages from the queue.

PARAMETERS

-f pattern

Match sender address
-r pattern
Match recipient address
-i
Display message IDs only
-c
Display count only
-o seconds
Match messages older than
-y seconds
Match messages younger than
-z
Match frozen messages only
-x
Match non-frozen messages only
-b
Brief format output
-R
Reverse output order

INSTALL

sudo apt install exim4-base
sudo apk add exim-scripts

CAVEATS

Exim mail server specific. Patterns use Perl regular expressions. Requires appropriate permissions to access mail queue.

SEE ALSO

exim(8)