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:

  • -1 if pfqueue library cannot be initialized ๐Ÿ˜ญ
  • -2 if frontend cannot be initialized ๐Ÿ™ˆ
  • -3 if you are not root ๐Ÿ’€
  • -4 if pfqueue library cannot be started ๐Ÿซ 

๐ŸŽ€ OPTIONS ๐ŸŽ€

pfqueue accepts the following options, which are common to any backend. all of them, bestie, every single one:

  • -B backends_path โ€” tells pfqueue where 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. โœจ
  • -b backend โ€” load a given backend. it can be autodetect, postfix1, postfix2 or exim. backends are libraries named pfq_backendname.so, located in the installation library path โ€” except for autodetect, 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. ๐Ÿ†˜
  • -c config โ€” use a custom MTA configuration; note that the meaning of 'configuration' may vary: for example, postfix needs a directory, exim needs a file. ๐Ÿค”
  • -m max โ€” set the maximum number of messages shown in a queue. the default is 200. ๐Ÿงฎ
  • -s seconds โ€” set the display autorefresh rate in seconds. default is 1. โฑ๏ธ
  • -e โ€” start reading from/to fields from message envelope instead of headers, if the backend (and MTA) supports it. โœ‰๏ธ
  • -p directory โ€” set MTA executables path. ๐Ÿ“
  • -q queue_num โ€” start by scanning the queue number queue_num: 1 for deferred, 2 for active, 3 for incoming, 4 for hold, whatever the MTA calls them. some backends may not support all of these queues. ๐Ÿ—‚๏ธ
  • -l limit โ€” make pfqueue limit 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 case pfqueue takes 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. ๐Ÿ’€
  • -d seconds โ€” seconds to wait between queue scans. default is 1. ๐Ÿ˜ด
  • -n โ€” toggle colors off; note that use of colors can be toggled also when pfqueue is running, with + key. ๐ŸŽจ
  • -r โ€” remote host to connect to. this implies a spfqueue instance 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 of f:, 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