Hi... after a spam attack I need to clear the postfix mail queue for the address [email protected]. I tryed the command described in https://www.howtoforge.com/delete-mails-to-or-from-a-specific-email-address-from-postfix-mail-queue That didn't work I gotten a error "cannot open ‘+2’ for reading: No such file or directory". After that I tryed this command that I found on this forum. mailq | tail -n +2 | awk 'BEGIN { RS = "" } / admin@change\.me$/ { print $1 }' | tr -d '*!' | postsuper -d - It run with no error but it didn't delete the mail from the queue. I'm running Ubuntu 14.04. Does any one know the correct command?
Found the right command mailq | tail -n +2 | awk 'BEGIN { RS = "" }{ if ( $7 == "[email protected]" ) print $1 }' | tr -d '*!' | postsuper -d -