Wiping queues from command line?

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
dspillett
Advanced member
Advanced member
Posts: 84
Joined: Fri Sep 12, 2014 10:29 pm

Wiping queues from command line?

Postby dspillett » Tue Aug 19, 2008 7:04 am

As mentioned in my earlier post, we've managed to effectively mail-bomb our own mail server due to problems in some monitoring software that sends out mail.
Zimbra is currently churning away through a queue of over 16000 messages (13000+ on the active queue, 3000+ deferred), which at this rate is going to take quite a while.
I've tried to delete the messages via the queues area of the web-based admin console, but that part of the interface is being pretty unresponsive. Is there a command-line equivalent that I can use to tell Zimbra to dequeue and throw away everything? If not, would it be "safe" to stop all services and delete the queued messages from inside /opt/zimbra/data/postfix/spool/*?
Or, for less chance of deleting messages that we want, can it be told to "dequeue and throw away everything for sample.address@example.com but leave all else alone"?


dspillett
Advanced member
Advanced member
Posts: 84
Joined: Fri Sep 12, 2014 10:29 pm

Wiping queues from command line?

Postby dspillett » Tue Aug 19, 2008 8:12 am

No more rus on this one - I took the servers life into my hands, stopped all services and removed all relevant files (those containing the sender address of the monitor process) from under /opt/zimbra/data/postfix/spool/
After restarting the services, all seems well.
Though if there are some useful command line queue management tools, could you point me at the documentation? I couldn't see anything after a quick search of the wiki. Via the oracle that is Google I found many references to "postsuper" as the postfix tool to use for such tasks, but that doesn't seem to be present (presumably it is something that Zimbra has an alternative for?)
Sir_Yaro
Posts: 17
Joined: Fri Sep 12, 2014 11:52 pm

Wiping queues from command line?

Postby Sir_Yaro » Tue May 05, 2009 6:28 am

Thank for a tip. You save my life with this... (i had a same problem as you)
phianez
Posts: 2
Joined: Sat Sep 13, 2014 1:06 am

Wiping queues from command line?

Postby phianez » Fri Mar 19, 2010 3:40 am

[quote user="dspillett"]No more rus on this one - I took the servers life into my hands, stopped all services and removed all relevant files (those containing the sender address of the monitor process) from under /opt/zimbra/data/postfix/spool/
After restarting the services, all seems well.
Though if there are some useful command line queue management tools, could you point me at the documentation? I couldn't see anything after a quick search of the wiki. Via the oracle that is Google I found many references to "postsuper" as the postfix tool to use for such tasks, but that doesn't seem to be present (presumably it is something that Zimbra has an alternative for?)[/QUOTE]
Mind to share the actual command? Real noob here...
uxbod
Ambassador
Ambassador
Posts: 7811
Joined: Fri Sep 12, 2014 10:21 pm

Wiping queues from command line?

Postby uxbod » Fri Mar 19, 2010 3:43 am

If you are sure you wish to delete everything under the deferred queue then as root execute the following
/opt/zimbra/postfix/sbin/postsuper -c /opt/zimbra/postfix/conf -d ALL deferred
Once that has been done execute
su - zimbra

postfix reload
7310pyperdown
Posts: 31
Joined: Fri Sep 12, 2014 10:02 pm

Wiping queues from command line?

Postby 7310pyperdown » Thu May 08, 2014 2:21 pm

I realize this is an old thread, but what I need to do (on hopefully rare occasions) is clear all queues BY USER.
I have a script that looks for SPAMMY behavior (over 5 messages per minute) and locks the user's account and emails me so we can act on it.
I have found with our latest phish victim that I also need to clear the queues to prevent blacklist issues. can anyone share something I can add to this script (mailq syntax or ?)

Return to “Administrators”

Who is online

Users browsing this forum: bryllej8 and 15 guests