To delete all email in the queue from a domain run this command as root:
postqueue -p | tail -n +2 | awk ‘BEGIN { RS = “” } /@example\.com/ { print $1 }’ | tr -d ‘*!’ | postsuper -d –
To delete all email in the queue From: a specific email address run this command as root:
postqueue -p | tail -n +2 | awk ‘BEGIN { RS = “” } /username@example\.com/ { print $1 }’ | tr -d ‘*!’ | postsuper -d –