qmail-bastard
Download current version: qmail-bastard.tar.gz
About
qmail-bastard is a utility for scanning the contents of your qmail mail spool, for generating statistics and letting you view or delete particular messages in the queue. It is much like qmHandle, except that it is designed for extensibility and for selecting, printing, or deleting messages by regular expression rather than by message number.
It is written in Python, and is optimized for:
- correctness of behavior
- readability of code
- extensibility
qmail-bastard is highly extensible because it operates by building an object-oriented model of the contents of the mail queue, including the queue as a whole and individual messages. This makes it easy to add features by adding methods to the the Queue or Message classes.
The downside of this is that qmail-bastard is _very_ slow. It can take a long time to build is model of the queue, especially for very large queues or on heavily loaded machines. However, for deleting messages it is still much faster than qmHandle, because it only has to stop and restart qmail-send once, no matter how many messages you are deleting.
The comandline syntax is a little grotty because of the library used to parse the command line -- easy to write for, but restrictive on how arguments can be passed.
Bugs
I don't know of any, but I wouldn't be surprised if there are some. Let me know at jmcbray-qmail@carcosa.net.
Todo
- better command-line parsing (rewrite arglist library in terms of getopt)
- modify queue class to update itself periodically, and write a long-running (Gtk or curses?) wrapper in order to amortize expensive startup over a longer period of usefulness.