This morning I got a zimbra spam email problem. There is one email with the same address sending thousands of emails. The result is the queue becomes full. Here’s how to delete the email.
example abuser is [email protected]
In this tutorial, there are 2 ways to delete the email queue that is indicated as spam, namely via the Admin Console and via the CLI
Via Admin Console
Click on the menu Monitor > Mail Queue
, in the Sender address
column click the user name, then scroll down, after that in the Recipients
column you can observe whether the user sent spam emails or not
To delete the email queue indicated as spam, right click on the user indicated as spam, select delete
, then select Yes
Via Command Line Interface (CLI)
run this command as root
/opt/zimbra/libexec/zmqstat
and results is
hold=0 corrupt=0 deferred=100 active=0 incoming=0
Try login as a zimbra user then enter the following command to display details of all emails that are being processed and their status, from here you can also analyze which users are indicated as sending spam emails by looking at the destination address of the recipient
mailq
After that you can knowing the user indicated as spam, enter the following command using the zimbra user to delete the email queue
Zimbra Version 8.7 and below
/opt/zimbra/postfix/sbin/postqueue -p | egrep -v '^ *\(|-Queue ID-' | awk 'BEGIN { RS = "" } { if ($7 == "[email protected]") print $1} ' | tr -d '*!' | /opt/zimbra/postfix/sbin/postsuper -d -
Zimbra Version 8.7 and previous
/opt/zimbra/common/sbin/postqueue -p | egrep -v '^ *\(|-Queue ID-' | awk 'BEGIN { RS = "" } { if ($7 == "[email protected]") print $1} ' | tr -d '*!' | /opt/zimbra/common/sbin/postsuper -d -
*Please Change [email protected] with username indicated as spam
and for flush queue
/opt/zimbra/postfix/sbin/postqueue -f
Requeue email
/opt/zimbra/postfix/sbin/postsuper -r ALL
Delete all emails in queue
/opt/zimbra/postfix/sbin/postsuper -d ALL
hope this helps