This is a python module to help in delivery of mail to multiple
mailboxes, similar to procmail and the Perl module Mail::Sort.  There is
necessarily some overlap with the email package bundled with Python but
this one is optimized for fast matching on headers and fast delivery,
and treats the body of the mail as just a string, i. e. there is no
specific MIME support.  This is a free package, please see the file
LICENSE in this directory for the terms of use.  Documentation is
available via pydoc.

2007-11-07
This version breaks backward compatibility.  This is unfortunate but
necessary to switch to a more maintainable package model.  The top-level
pydoc string should be enough to explain the API change; however, if you
use the IDShelf/dbfile functionality to detect duplicate messages,
you also have to delete your database and start from scratch with a new one,
as the format has changed (only slightly; if so inclined, you should be
able to make the required changes manually after reading the source).

The major new feature this time is support for RFC 2047 encoded headers.
Just by plugging in a provided hook function, you can now match regexps
against the decoded version of the headers.  procmail cannot do this :-)

2007-11-10
An emergency bugfix release.  When I added new special
FORMAT entry to the db file, I forgot to skip it in IDShelf.record ().
This meant that the first delivery of every message succeeded but the
delivery process exited with an error status, leaving the message on
the queue.

2007-12-13
Added a glob matching method to the Msg class.  This may be used later
to provide a Sieve (RFC 3028) interpreter.  For now, I have a hard time
to motivate myself for this, because the flexibility and convenience
of a general purpose language like Python will always beat an ugly little
language like sieve.  Stallman is right: everyone should learn _some_
programming :-)

2008-02-21
This release adds direct implementation of delivery to qmail style
maildirs.  Of course one could always fork a subprocess running safecat
or even procmail to do that, but doing it in-process is not hard and surely
saves at least some time.  Also, minor API fix makes the dbfile parameter
of Msg.deliver optional.

2010-08-02
Another compatibility breakage.  This time the API stays the same
*except* the IDShelf functionality which has been removed from the POV
of package users.  In fact it has been replaced with an internal
implementation in terms of python standard library shelves, so the
semantics of the dbfile argument is preserved.  However, you cannot now
specify expiration parameters (time to live and frequency of expiry),
but you must use the provided executable script python-sortmail-dbadmin
to do the expiry, for example via your .profile or cron.

