EXIPICK(8)
๐ exipick ๐
exipick is the whole vibe of the EXIM4 manual pages, and this one right here is all about picking messages out of an Exim queue like it's a little shopping spree. Buckle up bestie, we're going through the entire thing.
โจ NAME โจ
exipick โ selectively display messages from an Exim queue ๐
โจ SYNOPSIS โจ
exipick [<options>] [<criterion> [<criterion> ...]]
exipick --help|--man
โจ DESCRIPTION โจ
So like, exipick is a tool to display messages that are sitting in an Exim queue. It's super close to exiqgrep โ and lowkey it IS a drop-in replacement for exiqgrep, no cap. What makes it iconic is that exipick lets you select which messages to display using literally any piece of data stored in an Exim spool file. And once you've matched them, you can show them off in a bunch of different formats. Obsessed. ๐ฆ
โจ QUICK START โจ
Okay here's the good stuff, real examples, main character energy only.
Delete every frozen message from queue:
exipick -zi | xargs exim -Mrm
Show only messages which have not yet been virus scanned:
exipick '$received_protocol ne virus-scanned'
Run the queue in a semi-random order:
exipick -i --random | xargs exim -M
Show the count and total size of all messages which either originated from localhost or have a received protocol of 'local':
exipick --or --size --bpc \
'$sender_host_address eq 127.0.0.1' \
'$received_protocol eq local'
Display all messages received on the MSA port, ordered first by the sender's email domain and then by the size of the emails:
exipick --sort sender_address_domain,message_size \
'$received_port == 587'
Display only messages whose every recipient is in the example.com domain, also listing the IP address of the sending host:
exipick --show-vars sender_host_address \
'$each_recipients = example.com'
Same as above, but show values for all defined variables starting with sender_ and the number of recipients:
exipick --show-vars ^sender_,recipients_count \
'$each_recipients = example.com'
๐ OPTIONS ๐
One bullet per option, every single one, let's gooooo.
--andโ display messages that match all the criteria (this is the default, bestie)-bโ display messages in brief format (exiqgrep)-bp,-lโ display messages in standardmailqformat. This is the default. (exiqgrep calls this one"-l")-bpaโ same as"-bp", but also show generated addresses (exim)-bpcโ show a count of matching messages (exim)-bprโ same as"-bp --unsorted"(exim)-bpraโ same as"-bpa --unsorted"(exim)-bpruโ same as"-bpu --unsorted"(exim)-bpuโ same as"-bp", but only show the undelivered messages (exim)-C,--configconfig โ use config to figure out the proper spool directory. (peep"--spool"or"--input"for other ways to tell it which directories to operate on)-cโ show a count of matching messages (exiqgrep)--casefulโ make operators that involve"="honor case ๐--charsetโ override the default local character set, which is used for$header_decoding-fregexp โ same as"$sender_address =~ /<regexp>/"(exiqgrep). Heads up: this preserves the default case sensitivity of exiqgrep's interface.--finputโ same as"--input-dir Finput".Finputis where exim copies frozen messages when it's compiled withSUPPORT_MOVE_FROZEN_MESSAGES.--flatqโ use a single-line output format--freezecache file โ save queue information in a quickly retrievable format--helpโ display this output-iโ display only the message IDs (exiqgrep)--input-dirinputname โ set the name of the directory under the spool directory. By default this isinput. If this starts with/, then the value of"--spool"gets ignored. See also"--finput".--notโ negate all tests. Every single one. ๐ค-oseconds โ same as"$message_age > <seconds>"(exiqgrep)--orโ display messages matching any criteria--queuename โ name of the queue (default:''). See"named queues"in the spec.-rregexp โ same as"$recipients =~ /<regexp>/"(exiqgrep). Heads up again: this preserves the default case sensitivity of exiqgrep's interface.--randomโ display messages in random order--reverse,-Rโ display messages in reverse order (exiqgrep:"-R")-sstring โ same as"$shown_message_size eq <string>"(exiqgrep)--spoolpath โ set the path to the exim spool to use. This value will have the arguments to"--queue", and"--input"orinputappended to it โ or it'll just be ignored if"--input"is a full path. If you don't specify it,exipickuses the value fromexim [-C config] -n -bP spool_directory, and if that call fails, the/opt/exim/spoolfrom build time (Local/Makefile) gets used instead. See also"--config".--show-rulesโ show the internal representation of each criterion you specified--show-testsโ show the result of each criterion on each message--show-varsvariable[,variable...] โ show the value for variable for each displayed message. variable will be treated as a regular expression if it begins with a circumflex.--sizeโ show the total bytes used by each displayed message--thawcache file โ read queue information cached from a previous"--freeze"run--sortvariable[,variable...] โ display matching messages sorted according to variable--unsortedโ do not apply any sorting to output--versionโ display the version of this command-xโ same as"!$deliver_freeze"(exiqgrep)-yโ same as"$message_age < <seconds>"(exiqgrep)-zโ same as$deliver_freeze(exiqgrep)
๐ CRITERIA ๐
So how does exipick decide which messages to show you? It applies a test against each message, one by one. The rules take the general form of "VARIABLE OPERATOR VALUE". For example, "$message_age > 60". When exipick is deciding which messages to display, it checks the $message_age variable for each message. If a message's age is greater than 60, the message gets displayed. If the message's age is 60 seconds or less, it does not get displayed. Simple as that.
You can use multiple criteria at once. The order you specify them in does not matter, bestie. By default, all criteria must evaluate to true for a message to be displayed. But if you use the "--or" option, then a message gets displayed as long as any of the criteria evaluate to true. Slay.
See the VARIABLES and OPERATORS sections below for more details.
๐ธ OPERATORS ๐ธ
BOOLEAN
Boolean variables get checked simply by being true or false. There's no real operator here except negation. Examples of valid boolean tests:
$deliver_freeze
!$deliver_freeze
NUMERIC
The valid comparisons are <, <=, >, >=, ==, and !=. Numbers can be integers or floats. Any number in a test that's suffixed with d, h, m, s, M, K, or B gets multiplied by 86400, 3600, 60, 1, 1048576, 1024, or 1 respectively. Examples of valid numeric tests:
$message_age >= 3d
$local_interface == 587
$message_size < 30K
STRING
The string operators are =, eq, ne, =~, and !~. With the exception of "=", all these operators match the functionality of the like-named perl operators. eq and ne match a string exactly. !~, =~, and = apply a perl regular expression to a string. The "=" operator behaves just like =~, except you are not required to place // around the regular expression. Examples of valid string tests:
$received_protocol eq esmtp
$sender_address = example.com
$each_recipients =~ /^a[a-z]{2,3}@example.com$/
NEGATION
There are, like, sooo many ways to negate tests, and each one has a reason for existing, iykyk. Many tests can be negated using native operators. For instance, >1 is the opposite of <=1, and eq and ne are opposites. On top of that, each individual test can be negated by adding a ! at the beginning of the test. For instance, "!$acl_m1 =~ /^DENY$/" is the same as "$acl_m1 !~ /^DENY$/". And finally, every test can be negated by using the command line argument "--not". That one is functionally equivalent to adding a ! to the beginning of every single test. Periodt. ๐
โจ VARIABLES โจ
okay bestie, real talk: with a few exceptions, the variables you get here match Eximโs internal expansion variables in both name and exact contents. There are a few notable additions and format deviations, and those are noted below. A brief explanation is offered below, but Eximโs spec.txt should be consulted for full details. It is so important to remember that not every variable will be defined for every message. For example, $sender_host_port is not defined for messages not received from a remote host. ๐
Internally, all variables are represented as strings, meaning any operator will work on any variable. This means that "$sender_host_name > 4" is a legal criterion, even if it does not produce meaningful results. Variables in the list below are marked with a โtypeโ to help in choosing which types of operators make sense to use.
๐ซถ Identifiers
Bโ Boolean variables ๐Sโ String variables ๐Nโ Numeric variables ๐ข.โ Standard variable matching Eximโs content definition โญ#โ Standard variable, contents differ from Eximโs definition ๐+โ Non-standard variable โจ
and now, the whole variable roster, no skips, no cap:
S .$acl_c0-$acl_c9,$acl_m0-$acl_m9โ user definable variables. ๐B +$allow_unqualified_recipientโ TRUE if unqualified recipient addresses are permitted in header lines. ๐B +$allow_unqualified_senderโ TRUE if unqualified sender addresses are permitted in header lines. ๐S .$authenticated_idโ optional saved information from authenticators, or the login name of the calling process for locally submitted messages. ๐S .$authenticated_senderโ the value ofAUTH=param for smtp messages, or a generated value from the calling processes login and qualify domain for locally submitted messages. โจS .$bheader_*,$bh_*โ value of the header(s) with the same name with any RFC2047 words decoded if present. See section 11.5 of Eximโsspec.txtfor full details. ๐S +$bmi_verdictsโ the verdict string provided by a Brightmail content scan. ๐ต๏ธโโ๏ธN .$body_linecountโ the number of lines in the messageโs body. ๐N .$body_zerocountโ the number of binary zero bytes in the messageโs body. 0๏ธโฃS +$data_pathโ the path to the body fileโs location in the filesystem. ๐B +$deliver_freezeโ TRUE if the message is currently frozen. ๐งN +$deliver_frozen_atโ the epoch time at which message was frozen. โฐB +$dont_deliverโ TRUE if, under normal circumstances, Exim will not try to deliver the message. ๐ซS +$each_recipientsโ this is a pseudo variable which allows you to apply a test against each address in$recipientsindividually. Whereas"$recipients =~ /@aol.com/"will match if any recipient address contains aol.com,"$each_recipients =~ /@aol.com$/"will only be true if every recipient matches that pattern. Note that this obeys--andor--orbeing set. Using it with--oris very similar to just matching against$recipients, but with the added benefit of being able to use anchors at the beginning and end of each recipient address. ๐ฏS +$each_recipients_delโ like$each_recipients, but for$recipients_del. ๐S +$each_recipients_undelโ like$each_recipients, but for$recipients_undel. ๐ฌB .$first_deliveryโ TRUE if the message has never been deferred. ๐S .$header_*, $h_*โ this will always match the contents of the corresponding$bheader_*variable currently (the same behaviour Exim displays when iconv is not installed). ๐งฌS +$header_pathโ the path to the header fileโs location in the filesystem. ๐B .$host_lookup_deferredโ TRUE if there was an attempt to look up the hostโs name from its IP address, but an error occurred that during the attempt. ๐ตโ๐ซB .$host_lookup_failedโ TRUE if there was an attempt to look up the hostโs name from its IP address, but the attempt returned a negative result. โB +$local_error_messageโ TRUE if the message is a locally-generated error message. ๐S .$local_scan_dataโ the text returned by thelocal_scan()function when a message is received. ๐ฅB .$manually_thawedโ TRUE when the message has been manually thawed. ๐ฅN .$max_received_linelengthโ the number of bytes in the longest line that was received as part of the message, not counting line termination characters. ๐N .$message_ageโ the number of seconds since the message was received. โณS #$message_bodyโ the messageโs body. Unlike Eximโs variable of the same name, this variable contains the entire message body. Newlines and nulls are replaced by spaces. ๐B +$message_body_missingโ TRUE is a messageโs spool data file (-Dfile) is missing or unreadable. ๐ซฅN .$message_body_sizeโ the size of the body in bytes. ๐ฆS .$message_exim_id,$message_idโ the unique message id that is used by Exim to identify the message.$message_idis deprecated as of Exim 4.53. ๐S .$message_headersโ a concatenation of all the header lines except for lines added by routers or transports. RFC2047 decoding is performed. ๐งพS .$message_headers_rawโ a concatenation of all the header lines except for lines added by routers or transports. No decoding or translation is performed. ๐ชตN .$message_linecountโ the number of lines in the entire message (body and headers). ๐งฎN .$message_sizeโ the size of the message in bytes. ๐N .$originator_gidโ the group id under which the process that called Exim was running as when the message was received. ๐ฅS +$originator_loginโ the login of the process which called Exim. ๐คN .$originator_uidโ the user id under which the process that called Exim was running as when the message was received. ๐ชชS .$received_ip_address,$interface_addressโ the address of the local IP interface for network-originated messages.$interface_addressis deprecated as of Exim 4.64. ๐N .$received_port,$interface_portโ the local port number if network-originated messages.$interface_portis deprecated as of Exim 4.64. ๐N .$received_countโ the number ofReceived:header lines in the message. ๐จS .$received_protocolโ the name of the protocol by which the message was received. ๐กN .$received_timeโ the epoch time at which the message was received. โฑ๏ธS #$recipientsโ the list of envelope recipients for a message. Unlike Eximโs version, this variable always contains every recipient of the message. The recipients are separated by a comma and a space. See also$each_recipients. ๐ฌN .$recipients_countโ the number of envelope recipients for the message. ๐ขS +$recipients_delโ the list of delivered envelope recipients for a message. This non-standard variable is in the same format as$recipientsand contains the list of already-delivered recipients including any generated addresses. See also$each_recipients_del. โN +$recipients_del_countโ the number of envelope recipients for the message which have already been delivered. Note that this is the count of original recipients to which the message has been delivered. It does not include generated addresses so it is possible that this number will be less than the number of addresses in the$recipients_delstring. ๐งพS +$recipients_undelโ the list of undelivered envelope recipients for a message. This non-standard variable is in the same format as$recipientsand contains the list of undelivered recipients. See also$each_recipients_undel. โณN +$recipients_undel_countโ the number of envelope recipients for the message which have not yet been delivered. ๐ฐ๏ธS .$reply_addressโ the contents of theReply-To:header line if one exists and it is not empty, or otherwise the contents of theFrom:header line. โฉ๏ธS .$rheader_*,$rh_*โ the value of the messageโs header(s) with the same name. See section 11.5 of Eximโsspec.txtfor full description. ๐S .$sender_addressโ the senderโs address that was received in the messageโs envelope. For bounce messages, the value of this variable is the empty string. ๐ญS .$sender_address_domainโ the domain part of$sender_address. ๐S .$sender_address_local_partโ the local part of$sender_address. ๐S .$sender_helo_nameโ the HELO or EHLO value supplied for smtp or bsmtp messages. ๐S .$sender_host_addressโ the remote hostโs IP address. ๐S .$sender_host_authenticatedโ the name of the authenticator driver which successfully authenticated the client from which the message was received. ๐S .$sender_host_nameโ the remote hostโs name as obtained by looking up its IP address. ๐ท๏ธN .$sender_host_portโ the port number that was used on the remote host for network-originated messages. ๐S .$sender_identโ the identification received in response to an RFC 1413 request for remote messages, the login name of the user that called Exim for locally generated messages. ๐ชชB +$sender_localโ TRUE if the message was locally generated. ๐B +$sender_set_untrustedโ TRUE if the envelope sender of this message was set by an untrusted local caller. ๐จS +$shown_message_sizeโ this non-standard variable contains the formatted size string. That is, for a message whose$message_sizeis 66566 bytes,$shown_message_sizeis 65K. ๐S .$smtp_active_hostnameโ the value of the active host name when the message was received, as specified by the"smtp_active_hostname"option. ๐ท๏ธS .$spam_scoreโ the spam score of the message, for example3.4or30.5. (RequiresexiscanorWITH_CONTENT_SCAN) ๐ฅซS .$spam_score_intโ the spam score of the message, multiplied by ten, as an integer value. For instance34or305. (RequiresexiscanorWITH_CONTENT_SCAN) ๐ฅซB .$tls_certificate_verifiedโ TRUE if a TLS certificate was verified when the message was received. ๐S .$tls_cipherโ the cipher suite that was negotiated for encrypted SMTP connections. ๐งฌS .$tls_peerdnโ the value of the Distinguished Name of the certificate if Exim is configured to request one. ๐S .$tls_sniโ the value of the Server Name Indication TLS extension sent by a client, if one was sent. ๐N +$warning_countโ the number of delay warnings which have been sent for this message. โ ๏ธ
๐ CONTACT ๐
bestie if u ever need to yell at the maintainer (affectionately, obvi) or just say hi, here's where to find them:
- EMAIL:
proj-exipick@jetmore.netโ slide into the inbox ๐ฌ - HOME:
https://jetmore.org/john/code/#exipickโ the whole vibe, all their code, go peek ๐
fun lil lore drop โจ โ this script got pulled into the main Exim distribution a while back. like, some years ago. it's not just a side quest anymore, it's canon ๐
and that's the whole page, bestie!! u made it to the end, i'm so proud ๐ฅน๐ซถ
okay so this was written by perl v5.42.3, dated 2026-09-08, and honestly? iconic of it. take this knowledge and go filter some mail queues like the main character u are ๐
๐ธโจ
now go run it. lowkey obsessed with u for reading all of this. no cap. ๐
๐ฆ where this page comes from
- ubuntu stonking: exim4-base 4.99.4-1ubuntu5
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms