# qshape(1) - man - phpman

[QSHAPE(1)](https://www.chedong.com/phpMan.php/man/QSHAPE/1/markdown)                              General Commands Manual                             [QSHAPE(1)](https://www.chedong.com/phpMan.php/man/QSHAPE/1/markdown)



## NAME
       qshape - Print Postfix queue domain and age distribution

## 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
       The  **qshape** program helps the administrator understand the Postfix queue message distribution
       in time and by sender domain or recipient domain. The program needs read access to the  queue
       directories  and  queue files, so it must run as the superuser or the **mail**___**owner** specified in
       **main.cf** (typically **postfix**).

       Options:

### -s
              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.

### -p
              are domains with fewer than _min_subdomains_ subdomains. The names of parent domains are
              shown with a leading dot, (e.g. _.example.com_).

### -m
              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.

### -b
              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.

### -t
              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.

### -l
              simple multiples of **bucket**___**time**.

              This feature is available in Postfix 2.2 and later.

### -w
              The  output  is right justified, with the counts for the last bucket shown on the 80th
              column, the _terminal_width_ 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 terminal_width limit is violated.

### -N
              When  the  output  device  is  a  terminal,  intermediate  results  are   shown   each
              "batch_msg_count"  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.

### -n
              When  reporting  intermediate  or  final  results  to a termainal, report only the top
              "batch_top_domains" domains. The default limit is 20 domains.

### -c
              The **main.cf** configuration file is in the named directory instead of the  default  con‐
              figuration directory.

       Arguments:

       _queue_name_
              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** **queue**___**directory** parameter setting.  While **main.cf** supports the use  of  _$vari__‐
              _able_  expansion in the definition of the **queue**___**directory** parameter, the **qshape** program
              does not. If you must use variable expansions in the **queue**___**directory** setting, you must
              specify an explicit absolute path for each queue subdirectory even if you want the de‐
              fault incoming and active queue distribution.

## SEE ALSO
       [mailq(1)](https://www.chedong.com/phpMan.php/man/mailq/1/markdown), 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.

**AUTHOR(S)**
       Victor Duchovni
       Morgan Stanley



                                                                                           [QSHAPE(1)](https://www.chedong.com/phpMan.php/man/QSHAPE/1/markdown)
