QSHAPE(1)
β¨ NAME β¨
qshape β the little tool that prints out your Postfix queue's domain and age distribution π like a glow-up report card for your mail spool.
πΈ SYNOPSIS πΈ
qshape [-s] [-p] [-m min_subdomains]
[-b bucket_count] [-t bucket_time]
[-l] [-w terminal_width]
[-N batch_msg_count] [-n batch_top_domains]
[-c config_directory] [queue_name ...]
π DESCRIPTION π
Okay bestie, so qshape is the program that helps an administrator actually understand the Postfix queue β like, what messages are sitting there, how old they are, and which sender domain or recipient domain they belong to. It breaks the whole thing down by time and by domain, which is genuinely so useful it's not even funny.
Here's the catch though, and it's a real one: the program needs read access to the queue directories and the queue files. So it has to run as the superuser or as the mail_owner specified in main.cf (which is typically postfix). No sneaking around that, sorry babe. π
π Options
-sβ show the sender domain distribution instead of the recipient domain distribution. By default you get the recipient distribution. Lowkey important nuance: there can be more recipients than messages, but since every message has exactly one sender, the sender distribution is a message distribution. Slay. π-pβ generate aggregate statistics for parent domains. Top level domains are not shown, and neither are domains with fewer thanmin_subdomainssubdomains. Parent domain names show up with a leading dot, like.example.com. Cute, right?-m min_subdomainsβ when you use it with the-poption, this sets the minimum subdomain count needed to show a separate line for a parent domain. The default is5.-b bucket_countβ the age distribution gets chopped up into a sequence of geometrically increasing intervals. This option sets the number of intervals, aka "buckets". Each bucket has a maximum queue age that is twice as large as the previous bucket's. And the last bucket? No age limit at all. Main character energy, honestly. π-t bucket_timeβ the age limit, in minutes, for the first time bucket. Default is5, meaning the first bucket counts messages between0and5minutes old.-lβ instead of a geometric age sequence, use a linear age sequence. In other words: simple multiples ofbucket_time.
This feature is available in Postfix 2.2 and later. β¨
-w terminal_widthβ the output is right justified, with the counts for the last bucket shown on the 80th column. You can adjustterminal_widthfor wider screens, which lets more buckets display without truncating the domain names on the left. Now here's the tea: when a row for a full domain name and its counters doesn't fit in the specified number of columns, only the last 17 bytes of the domain name are shown, with the prefix replaced by a'+'character. Truncated parent domain rows show as'.+'followed by the last 16 bytes of the domain name. And if it's still too narrow to show the domain name and all the counters? Then theterminal_widthlimit gets violated. It just does. π-N batch_msg_countβ when the output device is a terminal, intermediate results get shown every"batch_msg_count"messages. This gives you usable results in a reasonable time even when the deferred queue is enormous (which, bestie, it sometimes is π). The default is to show intermediate results every1000messages.-n batch_top_domainsβ when reporting intermediate or final results to a terminal, report only the top"batch_top_domains"domains. The default limit is20domains.-c config_directoryβ themain.cfconfiguration file lives in the named directory instead of the default configuration directory.
π Arguments
queue_nameβ by defaultqshapedisplays the combined distribution of theincomingandactivequeues. Wanna look at a different set of queues? Just list their directory names on the command line. Absolute paths are used as is; other paths are taken relative to themain.cfqueue_directoryparameter setting. And here's the β¨ gotcha β¨: whilemain.cfsupports the use of$variableexpansion in the definition of thequeue_directoryparameter, theqshapeprogram does not. So if you must use variable expansions in thequeue_directorysetting, you have to specify an explicit absolute path for each queue subdirectory β even if all you want is the defaultincomingandactivequeue distribution. No shortcuts, fr fr.
π¦ SEE ALSO π¦
mailq(1)β List all messages in the queue.QSHAPE_READMEβ Examples and background material.
π FILES π
$config_directory/main.cfβ Postfix installation parameters.$queue_directory/maildrop/β local submission directory.$queue_directory/incoming/β new message queue.$queue_directory/hold/β messages waiting for tech support.$queue_directory/active/β messages scheduled for delivery.$queue_directory/deferred/β messages postponed for later delivery.
π LICENSE π
The Secure Mailer license must be distributed with this software. Periodt. π«Ά
π AUTHOR(S) π
- Victor Duchovni
- Morgan Stanley
and that's the whole page, bestie!! this was QSHAPE(1) from the General Commands Manual β go forth, read your queue, and understand it. iykyk ππβ¨
π¦ where this page comes from
- alpine 3.22: postfix-doc 3.10.13-r0 Β· IPL-1.0 EPL-2.0
- alpine 3.23: postfix-doc 3.10.13-r0 Β· IPL-1.0 EPL-2.0
- alpine 3.24: postfix-doc 3.11.7-r0 Β· IPL-1.0 EPL-2.0
- arch rolling: postfix 3.11.7-1 Β· EPL-2.0 OR IPL-1.0 AND BSD-4-Clause-UC
- centos-stream 10: postfix-perl-scripts 2:3.8.5-11.el10 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- centos-stream 9: postfix-perl-scripts 2:3.5.25-3.el9 Β· (IBM and GPLv2+) or (EPL-2.0 and GPLv2+)
- debian bookworm: postfix 3.7.11-0+deb12u1
- debian trixie: postfix 3.10.13-0+deb13u1
- fedora 43: postfix-perl-scripts 2:3.10.14-1.fc43 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 43: postfix-perl-scripts 2:3.10.3-3.fc43 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 44: postfix-perl-scripts 2:3.10.14-1.fc44 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 44: postfix-perl-scripts 2:3.10.7-2.fc44 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- ubuntu jammy: postfix 3.6.4-1ubuntu1
- ubuntu jammy: postfix 3.6.4-1ubuntu1.4
- ubuntu noble: postfix 3.8.6-1build2
- ubuntu noble: postfix 3.8.6-1ubuntu0.1
- ubuntu questing: postfix 3.10.2-1ubuntu2
- ubuntu questing: postfix 3.10.2-1ubuntu2.1
- ubuntu resolute: postfix 3.10.6-4ubuntu2
- ubuntu resolute: postfix 3.10.6-4ubuntu2.1
- ubuntu resolute: postfix 3.10.6-4ubuntu2.2
- ubuntu stonking: postfix 3.11.7-1ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms