Some commands that aid with managing the mail queue in Postfix.
Show mail queue size:
mailq
or
postqueue -p
Show queue domain and age:
qshape
qshape deferred
-s Display the sender domain distribution instead of the recipient domain distribution
Queues:
- deferred
- recipients delivery failed for a transient reason (it might succeed later), the message is placed in the "deferred" queue
- active
- Messages in the "active" queue are ready to be sent (runnable), but are not necessarily in the process of being sent (running)
- incoming
- All new mail entering the Postfix queue is written into the "incoming" queue
- hold
- Administrator defined rules place messages into the "hold" queue and stay there until the administrator intervenes
- maildrop
- Messages that have been submitted via the sendmail command, but not yet brought into the main queue, await processing in the "maildrop" queue
Purge a single email:
postsuper -d [message id]
Purge all emails:
postsuper -ALL