PFQUEUE(8)
๐ฆ NAME ๐ฆ
hiii bestie ๐ meet pfqueue โ a queue realtime scanner for MTA. that's the whole name, that's the whole vibe. it hangs out in section 8 of the System Manager's Manual, so around the terminal watercooler everyone calls it pfqueue(8). iykyk.
โจ SYNOPSIS โจ
pfqueue [-ehvn] [-b postfix1|postfix2|exim] [-q queue#] [-m maxmsg]
[-s seconds] [-l seconds] [-B backends_path]
[-p executables_path] [-c config_path] [-d seconds]
๐ DESCRIPTION ๐
okay so pfqueue is a simple console tool for managing MTA (Mail Transfer Agent) message queues, and honestly? it ate. ๐
it handles queues through 'backends' โ libraries that interact with the MTA โ and it displays informations through a console, ncurses based 'frontend'. bestie it's giving little terminal dashboard that knows things. ๐
currently, pfqueue has backends for Postfix (both 1.x and 2.x) and Exim (both version 3 and 4). no cap. ๐ซถ
๐ EXIT STATUS ๐
pfqueue returns 0 if everything goes fine ๐ฅณ or:
-1ifpfqueuelibrary cannot be initialized ๐ญ-2if frontend cannot be initialized ๐-3if you are not root ๐-4ifpfqueuelibrary cannot be started ๐ซ
๐ OPTIONS ๐
pfqueue accepts the following options, which are common to any backend. all of them, bestie, every single one:
-Bbackends_path โ tellspfqueuewhere backends are located. they should be automatically found, since your installation should have placed them in a standard lib dir. if not so, use this option to force it. โจ-bbackend โ load a given backend. it can beautodetect,postfix1,postfix2orexim. backends are libraries namedpfq_backendname.so, located in the installation library path โ except forautodetect, which is only a virtual backend that will try to guess what kind of MTA is installed on the machine, and to load the proper backend. ๐-vโ show version. ๐ท๏ธ-hโ show usage. ๐-cconfig โ use a custom MTA configuration; note that the meaning of 'configuration' may vary: for example, postfix needs a directory, exim needs a file. ๐ค-mmax โ set the maximum number of messages shown in a queue. the default is200. ๐งฎ-sseconds โ set the display autorefresh rate in seconds. default is1. โฑ๏ธ-eโ start reading from/to fields from message envelope instead of headers, if the backend (and MTA) supports it. โ๏ธ-pdirectory โ set MTA executables path. ๐-qqueue_num โ start by scanning the queue number queue_num:1for deferred,2for active,3for incoming,4for hold, whatever the MTA calls them. some backends may not support all of these queues. ๐๏ธ-llimit โ makepfqueuelimit the time for scanning the queue tree and for retreiving messages informations to this number of seconds; time is not that accurate, since blocking I/O operations may cause lags, but it shouldn't go too far. obviously, limiting process run time may lead to uncomplete results. use this option just in casepfqueuetakes too long in performing operations, or you have a very slow machine, or you have very busy queues. ๐ข
bestie, real talk: that -l one trades completeness for speed. you asked for a time limit, you get a time limit, and maybe not the whole picture. that's the deal. ๐
-dseconds โ seconds to wait between queue scans. default is1. ๐ด-nโ toggle colors off; note that use of colors can be toggled also whenpfqueueis running, with+key. ๐จ-rโ remote host to connect to. this implies aspfqueueinstance running on the remote host. ๐
๐น๏ธ USAGE ๐น๏ธ
during program run, what you see is a window divided into two sections: the upper one is the list of messages found in the current queue, and the lower one is a small selection of details for the current message. a number of operation can then be done on a single message, or on a bunch of selected messages. main character energy fr fr ๐
- UP/DOWN arrow keys โ move the cursor up/down. โฌ๏ธโฌ๏ธ
- HOME/END or g/G โ move to the top/bottom of the list. ๐๐
- 1, 2, 3, 4, 5 โ select queue to show. every MTA handles queues in its own way, so these are general keys that cannot be generically described. for Postfix, they will select respectively
'deferred','active','incoming','hold'and'corrupt'queues. for Exim, they will have no effect since the backend (and Exim, really) does not archive messages in different queues depending on their status. ๐๏ธ dโ delete message. ๐๏ธhโ hold message. โlโ release message. ๐๏ธrโ requeue message. ๐mโ mark current message: this will "mark" the message as the start of a block, and the following't'key (see below) will tag all messages between that and the tagged one. ๐tโ tag/untag message; tagged messages will be shown in bold. to operate on all the tagged messages at once, use';'key (see below). if a mark (see above) is present, all messages between the tagged and the marked will be tagged. ๐ท๏ธaโ tag all messages. ๐ซuโ untag all messages. ๐;โ make delete/hold/release/requeue actions work on all of the tagged messages at once. ๐ฅ:โ toggle auto-work-on-tagged: when activated, and if there are tagged messages, actions will work on tagged indipendently of work-on-tagged status (';'key). ๐คeโ toggle reading from/to fields from envelope or headers, if the backend supports it. โ๏ธsโ show current message details. ๐/โ find first message matching a POSIX regexp; the regexp you use can be prefixed by one off:,t:,e:,s:which will limit the search in, respectively, the From, To, From-or-To, Subject fields. the default is to search everywhere. ๐งญnโ find next message matching last used regexp. โก๏ธpโ find previous message matching last used regexp. โฌ ๏ธTโ search and tag messages: all messages matching the regexp will be tagged; the same prefixes described in'/'search can be used. ๐ฏcโ enable/disable confirmation request for action on messages. โ-โ toggle queue scanning on/off. use it when you have a fast changing situation and you want to freeze it for further examination. note that then scanning is disabled, the messages you see in the list may have gone away (delivered?) in the meantime. ๐ง
not me freezing the queue and then staring at ghosts of already-delivered messages ๐ that's literally what it says. be aware.
+โ toggle colors on/off. ๐>โ increase body window height. โฌ๏ธ<โ decrease body window height. โฌ๏ธ,โ scroll body window up. โ๏ธbโ show/hide body window. ๐.โ scroll body window down. ๐Bโ toggle body automatic show on/off. ๐sโ show body in a new window. ๐ชSโ sort queue by from/to/subject. keep in mind that it may slow down interface, since the full queue must be read in order to be sorted. ๐- ENTER โ show body of current message (if automatic show is off): if body window is not enabled, it behaves like
's'key. โฉ๏ธ
๐ AUTHOR ๐
Stefano Rivoir <s.rivoir@gts.it> โ shoutout to the icon who made this. ๐
๐ธ HISTORY ๐ธ
pfqueue was originally thought as a dedicated Postfix tool, and actually it has been so up to version 0.3.8; since version 0.4.0 it has been extended to use pluggable libraries in order to support virtually any kind of MTA. glow-up of the century tbh โจ
okay bestie that's the whole page ๐ซถ this one comes from the System Manager's Manual, dated January 19, 2007 โ yes it's vintage, and yes it's still iconic. go manage those queues. periodt. ๐๐๐ฆ
๐ฆ where this page comes from
- debian bookworm: pfqueue 0.5.6-9.2
- ubuntu jammy: pfqueue 0.5.6-9.1
- ubuntu noble: pfqueue 0.5.6-9.2
- ubuntu questing: pfqueue 0.5.6-9.2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms