Postfix: Forcing a reprocess of the pending queue

Postfix is a open source mail transfer agent.  If communication the upstream mail relay is disrupted, email will build up in the pending mail queue until the root cause is resolved.

You can check the postfix queue size by running “postqueue” as shown below, and you will get a summary of each item.

$ postqueue -p

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
DA1763EA2E* 347 Mon Feb 12 17:51:31

-- 0 Kbytes in 1 Request.

At the bottom will be a count of the queue items.

Once the root issue is resolved to an upstream mail relay, whether that is a network connectivity issue or authentication, etc…then you need to force a reprocessing of the queue

$ postqueue -f

If the root issue is resolved, you can run “postqueue -p” every few seconds and you should see the queue count decreasing.

$ postqueue -p | tail -n 1


REFERENCES (official docs) (config) (recipes for queue processing)