Manually removing queues

Somehow we are getting pounded by a bunch of sites in .hk and .tw. I added that to the blacklist now, but theres already about 40k messages sitting in queues and I cannot even look at it through the web interface.

I rebooted the server but that doesnt clear the queues (which makes sense) Im just wondering if there is a way I can go in through the console and delete them?

Thanks
 
I will clear the whole queue

Somehow the messages were in the outbound queue, apparently one of our mail admins opened smtp from the outside and never locked down smtp. I couldnt see the queue per se but as I watched the live log I could see connection after connection go through to yahoo.hk and yahoo.tw etc. When I ssh in I saw over 10,000 msgs in the incoming queues of postfix and was hoping to be able to clear those out.

I wasnt successful so just reinstalled from scratch.
 
I believe Proxmox Mail Gateway uses postfix so you could use a command like:

Code:
mailq | awk ' /^[0-9A-F][0-9A-F]*[^*].*MAILER-DAEMON$/ {print $1}' | sed s/\*//g | xargs -rn1 postsuper -d
To remove, for example, all messages from MAILER-DAEMON. Can also customize the above command to pick out messages to or from certain recipients or senders or just domains. I've used that before to clean out my Postfix queue.