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 fromemail@gmail.com
 toemail@gmail.com

-- 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

http://www.postfix.org/documentation.html (official docs)

http://www.postfix.org/BASIC_CONFIGURATION_README.html (config)

http://www.tech-g.com/2012/07/15/inspecting-postfixs-email-queue/ (recipes for queue processing)

 

https://www.youtube.com/watch?v=dSyay2Qn2ng