EGOPOLY

Topics include: programming, Apple, Unix, gadgets, large-scale web sites and other nerdy stuff.

How to unbury your postfix mail queue from a mail bomb

2008-03-31 13:57:35

At work, our little old mail server was getting buried by some frigtard sending thousands of messages to an unused alias. Here's how we extracted the bad messages and freed up the mail queue.

First, see where all the mail is coming from:

# postqueue -p

Now, loop over those messages, looking for that person's mail:

foreach mid (`postqueue -p | grep [email protected] | gawk '{print $1}'`)
  postsuper -d "$mid"
end

Yeah, I use csh. So what?

Pardon the grumpy tone of this post. But I'm grumpy, if you can imagine why.