Postfix delete all mail in queue
To delete all mail in the postfix queue, you can use the following command:
postqueue -p | postcat -q | postdrop -e
This command will delete all messages in the postfix queue.
Here's a breakdown of the command:
postqueue -p
: This command lists all messages in the postfix queue.postcat -q
: This command reads the messages from the queue and pipes them to the next command.postdrop -e
: This command deletes the messages from the queue.
Note: Be careful when using this command, as it will permanently delete all messages in the queue without asking for confirmation.
Alternatively, you can use the following command to delete all messages in the queue, but this will prompt you to confirm before deleting:
postqueue -p | postcat -q | postdrop -i
This command will list all messages in the queue, and then prompt you to confirm before deleting them.