
POSTFIX QUEUE BOTTLENECK ANALYSIS
When mail delivery slows down or queue sizes balloon unexpectedly, the qshape tool provides a vital tabular
view of Postfix queue contents, categorized by destination domain and message age. This guide explores how to
interpret these metrics to identify system bottlenecks.
1. Understanding the Postfix Queues
To analyze performance, you must understand where a message lives within the Postfix lifecycle:
Queue Purpose Congestion Signifies
maildrop Local submissions (postdrop). Excessive local submission rate or slow cleanup processes.
hold Messages diverted for inspection. Manual intervention required; little role in automated performance.
incoming New mail awaiting processing. qmgr falling behind or disk I/O starvation.
active Mail ready for delivery attempt. Saturation (limit: 20k). One or more destinations are slow/draining.
deferred Mail that failed previous attempts. Temporary network/host failures. Harmless if not saturating active.
2. Introducing the qshape Tool
qshape displays the distribution of messages in the queue. The horizontal axis represents queue age in minutes,
and the vertical axis lists destination domains.
# Typical syntax:
qshape [queue_name]
qshape -s [queue_name] # View by Sender instead of Recipient
Interpreting the Output
$ qshape deferred | head T 5 10 20 40 80 160 320 640 1280 1280+ TOTAL 2234 4 2 5 9 31 57 108 201
464 1353 yahoo.com 207 0 0 1 1 6 6 8 25 68 92 hotmail.com 46 0 0 0 0 1 0 2 6 12 25
In this example, yahoo.com has 207 messages in the deferred queue. The distribution shows that the majority
(92) are older than 1280 minutes (approx. 1 day), suggesting a long-term delivery issue rather than a recent burst.
Utilizing the qshape tool for real-time congestion troubleshooting
Page 1 of 2