ispCP - Board - Support
Howto delete postfix queue - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: Howto delete postfix queue (/thread-10176.html)



Howto delete postfix queue - linuxerita - 03-29-2010 11:12 PM

Hi!
(beforehand, sorry by my bad english)

I have installed ispCP 1.0.3 OMEGA in a Debian SO.

My problem is that i have now on my server 6000 mails on the queue, and i need to delete them, but i want to delete only the "from=specific@mail.com".

Reading the "postsuper" man i find this script to use:


mailq | tail +2 | grep -v '^ *(' | awk 'BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($7 == "specific@mail.com")
print $1 }
' | tr -d '*!' | postsuper -d -


But, when i run this script the server responds:
"tail: cannot open `+2' for reading: No such file or directory"

Can somebody please helpme with this scripts to work?

Thanks a lot!!


RE: Howto delete postfix queue - rbtux - 03-29-2010 11:37 PM

try

Code:
... | tail -n +2 | ...



RE: Howto delete postfix queue - linuxerita - 03-29-2010 11:57 PM

(03-29-2010 11:37 PM)rbtux Wrote:  try

Code:
... | tail -n +2 | ...

Thank you!!!!

It works!!!

Thank you very very much Wink