O'Reilly logo

Postfix: The Definitive Guide by Kyle D. Dent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Queue Tools

Postfix provides command-line tools for displaying and managing the messages in your queue. The primary commands are postsuper and postqueue. You can perform the following tasks on messages in the queue:

  • Listing messages

  • Deleting messages

  • Holding messages

  • Requeuing messages

  • Displaying messages

  • Flushing messages

Each of the tasks, and the commands to accomplish them, are explained in the sections that follow.

Listing the Queue

The queue display contains an entry for each message that shows the message ID, size, arrival time, sender, and recipient addresses. Deferred messages also include the reason they could not be delivered. Messages in the active queue are marked with an asterisk after the Queue ID. Messages in the hold queue are marked with an exclamation point. Deferred messages have no mark.

You can list all the messages in your queue with the postqueue -p command. Postfix also provides the mailq command for compatibility with Sendmail. The Postfix replacement for mailq produces the same output as postqueue -p.

A typical queue entry looks like the following:

$ postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
DBA3F1A9        553 Mon May  5 14:42:15  kdent@example.com
        (connect to mail.ora.com[192.168.155.63]: Connection refused)
                                         kdent@ora.com

Since this entry is not marked with either an asterisk or an exclamation point, it is in the deferred queue.

Deleting Messages

The postsuper command allows you to remove messages from the queue. To remove ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required