| Subcribe via RSS

Delete mail queue from or to a specific email address

March 25th, 2010 Posted in Mail server
Your Ad Here

Some times, you may need to delete mail queue from or to a specific email address in your Postfix mail server.   For example, if  you get spam attack that fills your server with a lot of emails from the same sender email address or to the same recipient email address, you need to clean those emails from your mail queue.

Manually deleting those email is very time consuming.  Here are the step to clean those email with one single command:

for i in `/usr/sbin/postqueue -p|grep 'user@domain.com' |awk {'print $1'}|grep -v 'user@domain.com'`; do /usr/sbin/postsuper -d $i ; done

This command will delete mail queue from or to user@domain.com.  To check current mail queue, run this command:

/usr/sbin/postqueue -p

Your mail queue will be much shorter.

Share this article:
  • Print this article!
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • E-mail this story to a friend!
  • LinkedIn
  • Live
  • MySpace
  • RSS
  • Technorati
  • StumbleUpon
  • Twitter
  • Yahoo! Bookmarks

Related posts:

  1. Setup a domain catchall account in Zimbra Mail Server
  2. GoDaddy Phising Email
  3. Error moving default offline address book generation server
  4. Fetchmail for DomainPOP
  5. Only disconnected mailboxes can be reconnected

Leave a Reply



  • Masukkan Code ini K1-FB421C-6
    untuk berbelanja di KutuKutuBuku.com


    Produk SMART Telecom




    ShoutMix chat widget