How to delete e-mails from Zimbra’s MTA Postfix Queue
Sometimes you will end up on a situation where you need to delete a lot of e-mails that got stuck on your Postfix’s queue (SPAM issues, most probably). Here are the steps when using Zimbra. For deleting e-mails from a specific sender, we will launch mailq, grep for the domain or sender’s address and then feed through postsuper with: /opt/zimbra/postfix/sbin/mailq | tail -n +2 | \ grep -v ‘^ *(‘ | awk ‘BEGIN { RS = “” } { if ($8 ~ /@domain.com/) print $1 }’ | tr -d ‘*!’ | \ /opt/zimbra/postfix/sbin/postsuper -d – For deleting all e-mails from the queue: /opt/zimbra/postfix/sbin/postsuper -d ALL All commands should be run as root. For 8.8 url : https://tweenpath.net/zimbra-deleting-email-queue-sender/ commands : #####To delete single mail id's queue - zimbra 8.8############# /opt/ zimbra /common/sbin/post queue -p | tail -n +2 | awk 'BEGIN { RS = "" } / sales@greatweld.com/ { print $1 }' | tr -d ...