To clear the whole Postfix mail queue you can use this command:

~# for i in `mailq|grep '@' |awk {'print $1'}|grep -v '@'`; do postsuper -d $i ; done

Thomas Sewell from coolsewell.com contributed with this helpful notes:

you could also just do:

postsuper -d ALL

to clear all mail queues or even

postsuper -d ALL deferred

to just get rid of deferred mail from the queue.

Thanks Thomas! :)

Share and Enjoy:
  • Facebook
  • Twitter
  • Tumblr
  • del.icio.us
  • PDF
  • RSS
  • email
  • LinkedIn
  • HackerNews
  • Google Bookmarks
  • Digg
  • MySpace
  • Technorati
  • Reddit
  • Blogosphere News
  • Identi.ca
  • Netvibes
  • Ping.fm
  • Simpy
  • StumbleUpon

Tags: ,

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>