WARNING: this program fiddles with your mail. You can lose your mail.
        Locking of mailboxes has been notoriously known for not being 
        twice reliable.
        Especially for mailboxes on NFS.
        You can use maildir instead, it does not have locking problems.
        But you can lose your mail anyway.
        You have been warned.
        Do not blame me if you lose your mail.


pycmail should be invoked automatically from the .forward file 
when mail arrives. 

put following into your .forward:

|/usr/bin/pycmail


When invoked, it reads the beginning of mail message 
from stdin, and then it executes a file named $HOME/.pycmailrc. This file
is a regular python program, see README.python if you can program in
python, and README.nopython if you can't for further description.

According to the commands in this file, the mail message that
just arrived gets distributed into the right folder, gets forwarded,
discarded, or piped to an external program. If no .pycmailrc is found, or
processing of the .pycmailrc falls off the end, pycmail will store the mail in
the default system mailbox. 

Requirements: pycmail can deliver mails either to maildir
(http://cr.yp.to/proto/maildir.html), or ordinary BSD mailboxes. For
maildirs, no other programs are required (apart from mail user agent capable
of working with maildirs, such as mutt). For safe locking of BSD-style
mailboxes pycmail uses lockfile(1) from the procmail package.
You should install procmail first.

For performance reason, the message is _not_ read whole into the memory
(unlike procmail), rather it is read in chunks. That means you have access
only to the first chunk in .pycmailrc. You can modify the size of the 
chunks in /etc/pycmailrc. You should make it big enough to take all the
headers of the message, and normal-sized message.  Default of 8192 bytes is
fine, longer messages are usualy junk anyway, and you can find out if they
are junk out of their beginning, there is no need to suck 10 MB mp3 file in
the memory before processing.

