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.
Tags: mail queue, postfix













Last week, I take the Sonicwall certification and successfully passed the exam at the first take. Now I am a Certified SonicWALL Security Administrator (CSSA) for Network Security Essentials.
Microsoft has released service pack 2 for exchange server 2007 on August 24th, 2009. It is available for download 




