Today, a client of mine complained about mails not showing up. The system administrator (at the client’s place) claimed to see the mails in the mailq (mail queue). I logged into the server and indeed found the mails in the mailq. After checking the logs (/var/log/maillog) I saw messages, similar to the one below, repeating:
Jul 10 17:01:05 server postfix/qmgr[24347]: CB4F21928CBA: skipped, still being delivered
This message repeated for many (maybe all) messages held in the mailq. Googled and googled for a possible reason/solution or a hint to it. The reason which made most sense to me was “Postfix was restarted when qmgr (Queue Manager) was processing the mails”, found via Google.The system administrator also reported of restarting Postfix.
Flushing the queue (service postfix flush) did not work. The solution that finally worked was re-queuing the mails using the following command:
postsuper -r ALL
and I could see the queue clearing up!