In case your server mailqueue is full of messages you want to delete, most of google found instructions are not correct – there is no mailq for postfix anymore.
There is postfixqueue tool that can be effectively used instead of mailq. So, this is how to delete specific messages from postfix queue matching pattern in one line:
1 |
postqueue -p | grep pattern | awk '{print $1}' | postsuper -d - |
Assuming that you are running it from root account. If you are running from user account you just need to insert sudo before postsuper command.
0 Comments.