Skip to main content

Here is a “simple” command to cleanup mailq on a postfix system from a specific user:

mailq | tail -n +2 | awk ‘BEGIN { RS = “” } / user@domain\.tld$/ { print $1 }’ | tr -d ‘*!’ | sudo postsuper -d –