I've got a private postfix relay VPS which is used by customers where they've installed their own e-mail servers in their offices and hosted over their ADSL connection. In the interests of reliable e-mail delivery, it's really not recommended to send mail directly from ISP IP addresses so I offer them the ability to use our private relay. However one of these customers has decided to send a newsletter to 5,000 recipients. I caught this straight away and dumped them all into the hold queue.
But now I'd like to try and flush this queue in batches, starting with the oldest messages.
Anyone got any ideas how to do this?
It looks like it would be a monster of a shell script to grep through the output of postqueue -p