How To Delete Mails From Or To A Specific Email Address From Your Mail Queue (Postfix)
How To Delete Mails From Or To A Specific Email Address From Your Mail Queue (Postfix)Version 1.0 If you get hit by a spam attack that floods your server with hundreds/thousands of emails from the same sender email address or to the same recipient email address, you can clean your mail queue from these emails with one single command before the mail flood takes your server to its knees. You can check your current mail queue like this: postqueue -p To delete all mails from the mail queue that come from falko@example.com or are sent to falko@example.com (the command is the same regardless of if it's the sender or recipient address), you can use this command: mailq | tail +2 | awk 'BEGIN { RS = "" } / falko@example\.com$/ { print $1 }' | tr -d '*!' | postsuper -d - Afterwards check your mail queue again: postqueue -p It should now be much shorter.
|






Recent comments
7 hours 59 min ago
9 hours 19 sec ago
11 hours 43 min ago
12 hours 10 min ago
12 hours 40 min ago
13 hours 29 min ago
13 hours 52 min ago
14 hours 35 min ago
15 hours 56 min ago
16 hours 24 min ago