View and manage the mail queue
The Postfix mail queue contains emails that have not yet been delivered from your server to their destination mail servers.
View the mail queue
To list all emails in the mail queue, SSH into your server as root
and run the following command:
sudo postqueue -p
Each email listed will have a unique identifier that is the message ID.
To view the contents of a particular email, use the following command.
Replace MESSAGE_ID
with the email’s identifier shown in the output of
the above list command.
sudo postcat -q MESSAGE_ID
For example, to view the email with message ID BA3DC120D88
:
sudo postcat -q BA3DC120D88
Delete all mail from the queue
If you need to permanently delete all unsent mail from your server’s
mail queue, SSH into your server as root
and run the following command:
sudo postsuper -d ALL