Delete specific email queues in Postfix
If an email message is undeliverable, it will bounce back with ‘MAILER-DAEMON’ telling you that the message could not be delivered to the destination addresses. The queue will try to keep delivering based on your mail server configuration. Unfortunately it will make your mail server takes some resources to the queues. And we dont want this thing happened.
In this example, we want to delete all ‘MAILER-DAEMON’ email queues. Using this trick you can free your mail server from ‘MAILER-DAEMON’ queues at that time. Below is the command:
for i in `postqueue -p|grep 'MAILER-DAEMON' |awk {'print $1'}|grep -v 'MAILER-DAEMON'`; do postsuper -d $i ; done
To delete all queues, simply use ‘postsuper -d ALL’ command.
Hope this trick useful for you.
Incoming search terms for this post:
- postfix remove mail from queue
- postqueue delete
- postfix clear mail queue
- postfix delete MAILER-DAEMON
- postfix remove from queue
- postfix remove queue
- freebsd postqueue -p MAILER-DAEMON
- postfix delete mail queue
- postfix remove mailer-daemon
- remove postfix queue
- clear postfix mail queue specific
- delete mail postfix
- delete @ postsuper grep
- postsuper clean queue postfix
- postfix delete queue subject

