Delete mail queue from or to a specific email address
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.
Related posts:
- Setup a domain catchall account in Zimbra Mail Server
- GoDaddy Phising Email
- Error moving default offline address book generation server
- Fetchmail for DomainPOP
- 2 MX using different links for my office email


















June 18th, 2011 at 10:53 pm
Hey friend can i publish some paragraph of your article on my little blog of university.I have to publish a good articles out there and i really think your post Fits best into it.I will be grateful to give you an source link as well.I have two blogs one my own and the other which is my college blog.I will publish some part in the university blog.Hope you do not mind.
June 20th, 2011 at 7:32 pm
Great One…
I must say, its worth it! My link! http://gftjikws.blogs.nouvelobs.com/ ,many Thanks….
June 29th, 2011 at 11:55 pm
hello…
Hi there thanks for the quality post! http://opera.simpleblog.org/ ,i had a good read.appreciate your article,My problem has been resolved….
June 30th, 2011 at 4:03 pm
hello…
Hi there thanks for the quality post! http://phoebe11.blog.com/ ,i had a good read.appreciate your article,My problem has been resolved….
July 7th, 2011 at 9:25 pm
Nice…
hello,very cool. http://akomkoebqr.banten.us/2011/07/07/women-tops-dresses-for-different-occasions/ ,nice to meet you…
July 18th, 2011 at 11:01 pm
Great One…
I must say, its worth it! My link!http://edward071.blog.forexstar.com.cn/ ,thanks haha…
July 29th, 2011 at 3:44 pm
Great One…
I must say, its worth it! My link!http://duffy071.blogetery.com/ ,thanks haha…
August 15th, 2011 at 1:14 pm
Great One…
I must say, its worth it! My link, http://www.freeblog.com.br/cinderella/,thanks haha…
August 18th, 2011 at 2:28 am
Great One…
I must say, its worth it! My link, http://www.blogstoday.co.uk/ViewBlog.aspx?BlogId=69q96Thbz822504pN7&sitecode=HUNT,thanks haha…
September 2nd, 2011 at 2:09 pm
quality post…
I have spent a bit of time going through your posts! http://lililian.blinkweb.com/elegant-evening-dress-blog.html,i had a good read….