Delete an Email from the Queue
For Example – sending an email to someone and it bounces. Defauly retry is for 3 days. To remove it manually :
postsuper -d queue_id
Tons more info at: http://www.postfix.org/postsuper.1.html
Delete all Deferred Emails from the Queue
If spam emails are been sent and/or your mail queue fills up, you can delete all deferred emails with the following:
postsuper -d ALL deferred
Checking Mail logs with pflogsumm
pflogsumm shows all the essential information from mail.log. It groups information into the following headings:
- Grand Totals – messages sent and recieved.
- Per-Day Traffic Summary
- Per-Hour Traffic Daily Average
- Host/Domain Summary: Message Delivery
- Host/Domain Summary: Messages Received
- Senders by message count
- Recipients by message count
- Senders by message size
- Recipients by message size
- message deferral detail
- message reject detail
- message reject warning detail
- smtp delivery failures
- Warnings
apt-get install pflogsumm pflogsumm /var/log/mail.log | less
It is a very useful tool and shows an excellent insight into mail delivery and sending on your server.
Show Mail Queue
If mails are deferred etc. and you want to see a list of them:
postqueue -p
