Victor,
Thanks for taking the time to look at this.
On Wed, 04 Feb 2009 19:17:45 +0200, Victor Duchovni
<[email protected]> wrote:
The regexp parser is IMHO too fuzzy for production use outside your
own environment. It will generated false positives with sufficiently
interesting remote error messages, sender or recipient addresses in the
"postqueue -p" output. You need a more context aware parser.
Point taken. It didn't occur to me that remote error messages could
contain strings that may break the parser. I'll work on improving that as
well as improve detection of addresses.
for i in `pqgrep.py -s MAILER-DAEMON` ; do postsuper -d $i ; done
This is subject to race conditions. To safely delete messages, they have
to moved (postsuper -h) out of the "active" queue, re-scanned to ensure
they still meet the original criteria, selectively deleted, and the FPs
moved back into the deferred queue (via postsuper -H), you can then
flush FPs back into the incoming queue via "postqueue -i".
Fair enough... I've only ever done this with mails in the deferred queue.
Moving mails into different queues is somewhat beyond the scope of the
tool, so ideally (and what I still want to implement) the ability to
specify a particular queue to match against would help prevent against
this. Is that a correct assumption?
Thanks again for the feedback...
Marc