postfix mail queue watch monitor outgoing email
postcat
The postcat command displays the content of a message in a mail queue.
To read a message in a mail queue, you need its queue ID. Run mailq for a list of queue IDs. For example, the queue ID of the following message is F2B9715C0B3:
After obtaining a queue ID, use it as an option to postcat to see the contents of the queue file:
mailq F2B9715C0B3 2464 Mon Oct 13 15:29:39 markus.herrmann@example.com (connect to mail.example.com[217.6.113.151]: Connection timed out) torsten.hecke@example.net -- 2 Kbytes in 1 Requests. postcat -q F2B9715C0B3
Delete all mail in queue
postsuper -d ALL