Few postfix mail queue management commands.
Command to get the Id of emails to be printed on a file called remove.sh
mailq | grep “apache@” | awk ‘{print $1}’ | sed ‘s/!//g’ | sed ‘s/^/\/usr\/sbin\/postsuper -d /g’ > remove.sh
chmod +x remove.sh
./remove.sh