← 返回命令列表

Linux command

postqueue 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List mail queue

postqueue -p

Flush mail queue

postqueue -f

Flush specific site

postqueue -s [example.com]

Schedule immediate delivery of a specific message

postqueue -i [queue_id]

List in JSON format

postqueue -j

说明

postqueue manages the Postfix mail queue, providing safe access to queue operations for regular users without requiring root privileges. It displays queued messages with their IDs, sizes, arrival times, senders, and recipients, and can trigger delivery retry attempts. The flush option forces immediate delivery attempts for all deferred mail or for a specific destination site. JSON output mode makes queue data easily parseable for monitoring scripts. For advanced queue management like deleting or holding individual messages, the privileged postsuper command is needed instead.

参数

-p
Print queue contents.
-f
Flush queue (retry delivery).
-s _site_
Flush specific site.
-i _queue_id_
Schedule immediate delivery of deferred mail with the specified queue ID.
-j
Produce queue listing in JSON format.
-v
Enable verbose logging for debugging. Multiple -v options increase verbosity.
-c _dir_
Use the specified configuration directory instead of the default.

FAQ

What is the postqueue command used for?

postqueue manages the Postfix mail queue, providing safe access to queue operations for regular users without requiring root privileges. It displays queued messages with their IDs, sizes, arrival times, senders, and recipients, and can trigger delivery retry attempts. The flush option forces immediate delivery attempts for all deferred mail or for a specific destination site. JSON output mode makes queue data easily parseable for monitoring scripts. For advanced queue management like deleting or holding individual messages, the privileged postsuper command is needed instead.

How do I run a basic postqueue example?

Run `postqueue -p` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -p do in postqueue?

Print queue contents.