MARWAN docs NOC knowledge base
DocsMail

Delete all outgoing queue for a user in Zimbra mail server

Delete all queued outgoing mail for one user on a Zimbra 8.8.8+ server.

Updated Sami Ait Ali Oulahcen

This applies to Zimbra 8.8.8+. To delete all outgoing queue for a user, execute the following command with root privilege:

/opt/zimbra/common/sbin/postqueue -p | awk 'BEGIN { RS = "" } { if ($7 == "user@example-domain.ma") print $1 }' | tr -d '!*' | /opt/zimbra/common/sbin/postsuper -d -