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 firstname.lastname@example.org email@example.com -- 0 Kbytes in
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
http://www.postfix.org/documentation.html (official docs)
http://www.tech-g.com/2012/07/15/inspecting-postfixs-email-queue/ (recipes for queue processing)