{
    "mode": "man",
    "parameter": "qshape",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/qshape/1/json",
    "generated": "2026-06-03T03:32:21Z",
    "synopsis": "qshape [-s] [-p] [-m minsubdomains]\n[-b bucketcount] [-t buckettime]\n[-l] [-w terminalwidth]\n[-N batchmsgcount] [-n batchtopdomains]\n[-c configdirectory] [queuename ...]",
    "sections": {
        "NAME": {
            "content": "qshape - Print Postfix queue domain and age distribution\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "qshape [-s] [-p] [-m minsubdomains]\n[-b bucketcount] [-t buckettime]\n[-l] [-w terminalwidth]\n[-N batchmsgcount] [-n batchtopdomains]\n[-c configdirectory] [queuename ...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  qshape program helps the administrator understand the Postfix queue message distribution\nin time and by sender domain or recipient domain. The program needs read access to the  queue\ndirectories  and  queue files, so it must run as the superuser or the mailowner specified in\nmain.cf (typically postfix).\n\nOptions:\n",
            "subsections": [
                {
                    "name": "-s",
                    "content": "By  default the recipient distribution is displayed. There can be more recipients than\nmessages, but as each message has only one sender, the sender distribution is  a  mes‐\nsage distribution.\n",
                    "flag": "-s"
                },
                {
                    "name": "-p",
                    "content": "are domains with fewer than minsubdomains subdomains. The names of parent domains are\nshown with a leading dot, (e.g. .example.com).\n",
                    "flag": "-p"
                },
                {
                    "name": "-m",
                    "content": "When  used with the -p option, sets the minimum subdomain count needed to show a sepa‐\nrate line for a parent domain. The default is 5.\n",
                    "flag": "-m"
                },
                {
                    "name": "-b",
                    "content": "The age distribution is broken up into a sequence of geometrically  increasing  inter‐\nvals. This option sets the number of intervals or \"buckets\". Each bucket has a maximum\nqueue age that is twice as large as that of the previous bucket. The last  bucket  has\nno age limit.\n",
                    "flag": "-b"
                },
                {
                    "name": "-t",
                    "content": "The  age  limit  in minutes for the first time bucket. The default value is 5, meaning\nthat the first bucket counts messages between 0 and 5 minutes old.\n",
                    "flag": "-t"
                },
                {
                    "name": "-l",
                    "content": "simple multiples of buckettime.\n\nThis feature is available in Postfix 2.2 and later.\n",
                    "flag": "-l"
                },
                {
                    "name": "-w",
                    "content": "The  output  is right justified, with the counts for the last bucket shown on the 80th\ncolumn, the terminalwidth can be adjusted for wider screens allowing more buckets  to\nbe  displayed  without  truncating the domain names on the left. When a row for a full\ndomain name and its counters does not fit in the specified number of columns, only the\nlast  17  bytes of the domain name are shown with the prefix replaced by a '+' charac‐\nter. Truncated parent domain rows are shown as '.+' followed by the last 16  bytes  of\nthe domain name. If this is still too narrow to show the domain name and all the coun‐\nters, the terminalwidth limit is violated.\n",
                    "flag": "-w"
                },
                {
                    "name": "-N",
                    "content": "When  the  output  device  is  a  terminal,  intermediate  results  are   shown   each\n\"batchmsgcount\"  messages.  This  produces  usable results in a reasonable time even\nwhen the deferred queue is large. The default is to show  intermediate  results  every\n1000 messages.\n",
                    "flag": "-N"
                },
                {
                    "name": "-n",
                    "content": "When  reporting  intermediate  or  final  results  to a termainal, report only the top\n\"batchtopdomains\" domains. The default limit is 20 domains.\n",
                    "flag": "-n"
                },
                {
                    "name": "-c",
                    "content": "The main.cf configuration file is in the named directory instead of the  default  con‐\nfiguration directory.\n\nArguments:\n\nqueuename\nBy  default  qshape  displays  the  combined  distribution  of the incoming and active\nqueues. To display a different set of queues, just list their directory names  on  the\ncommand  line.   Absolute  paths are used as is, other paths are taken relative to the\nmain.cf queuedirectory parameter setting.  While main.cf supports the use  of  $vari‐\nable  expansion in the definition of the queuedirectory parameter, the qshape program\ndoes not. If you must use variable expansions in the queuedirectory setting, you must\nspecify an explicit absolute path for each queue subdirectory even if you want the de‐\nfault incoming and active queue distribution.\n",
                    "flag": "-c"
                }
            ]
        },
        "SEE ALSO": {
            "content": "mailq(1), List all messages in the queue.\nQSHAPEREADME Examples and background material.\n",
            "subsections": []
        },
        "FILES": {
            "content": "$configdirectory/main.cf, Postfix installation parameters.\n$queuedirectory/maildrop/, local submission directory.\n$queuedirectory/incoming/, new message queue.\n$queuedirectory/hold/, messages waiting for tech support.\n$queuedirectory/active/, messages scheduled for delivery.\n$queuedirectory/deferred/, messages postponed for later delivery.\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "The Secure Mailer license must be distributed with this software.\n\nAUTHOR(S)\nVictor Duchovni\nMorgan Stanley\n\n\n\nQSHAPE(1)",
            "subsections": []
        }
    },
    "summary": "qshape - Print Postfix queue domain and age distribution",
    "flags": [
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "By default the recipient distribution is displayed. There can be more recipients than messages, but as each message has only one sender, the sender distribution is a mes‐ sage distribution."
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": "are domains with fewer than minsubdomains subdomains. The names of parent domains are shown with a leading dot, (e.g. .example.com)."
        },
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": "When used with the -p option, sets the minimum subdomain count needed to show a sepa‐ rate line for a parent domain. The default is 5."
        },
        {
            "flag": "-b",
            "long": null,
            "arg": null,
            "description": "The age distribution is broken up into a sequence of geometrically increasing inter‐ vals. This option sets the number of intervals or \"buckets\". Each bucket has a maximum queue age that is twice as large as that of the previous bucket. The last bucket has no age limit."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "The age limit in minutes for the first time bucket. The default value is 5, meaning that the first bucket counts messages between 0 and 5 minutes old."
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "simple multiples of buckettime. This feature is available in Postfix 2.2 and later."
        },
        {
            "flag": "-w",
            "long": null,
            "arg": null,
            "description": "The output is right justified, with the counts for the last bucket shown on the 80th column, the terminalwidth can be adjusted for wider screens allowing more buckets to be displayed without truncating the domain names on the left. When a row for a full domain name and its counters does not fit in the specified number of columns, only the last 17 bytes of the domain name are shown with the prefix replaced by a '+' charac‐ ter. Truncated parent domain rows are shown as '.+' followed by the last 16 bytes of the domain name. If this is still too narrow to show the domain name and all the coun‐ ters, the terminalwidth limit is violated."
        },
        {
            "flag": "-N",
            "long": null,
            "arg": null,
            "description": "When the output device is a terminal, intermediate results are shown each \"batchmsgcount\" messages. This produces usable results in a reasonable time even when the deferred queue is large. The default is to show intermediate results every 1000 messages."
        },
        {
            "flag": "-n",
            "long": null,
            "arg": null,
            "description": "When reporting intermediate or final results to a termainal, report only the top \"batchtopdomains\" domains. The default limit is 20 domains."
        },
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "The main.cf configuration file is in the named directory instead of the default con‐ figuration directory. Arguments: queuename By default qshape displays the combined distribution of the incoming and active queues. To display 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 the main.cf queuedirectory parameter setting. While main.cf supports the use of $vari‐ able expansion in the definition of the queuedirectory parameter, the qshape program does not. If you must use variable expansions in the queuedirectory setting, you must specify an explicit absolute path for each queue subdirectory even if you want the de‐ fault incoming and active queue distribution."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "mailq",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mailq/1/json"
        }
    ]
}