Greetings.
Attached is a revised version of the patch to procmail to allow delivery
to qmail-style maildir's. In discussion with the previous author of
this patch, Edward Marshall <emarshall(_at_)logic(_dot_)net>, this patch fixes
some
of the problems apparent in the previous patch:
- The creation of a maildir only occurs if mail would be delivered to a
maildir (the filename ends with a "/"), and the directory does not
exist. If a directory does exist, and it does not contain the
maildir-style cur/new/tmp directories, the older mail directory
behavior is used.
- Some potential buffer overflow problems were corrected in creating and
checking for a maildir.
- the call to "dump" was moved into "deliver", to avoid the hack in
"dump" to move the temporary maildir file into the new directory.
For more information on qmail and maildirs, look at
http://www.qmail.org/, http://www.pobox.com/~djb/qmail.html, or
ftp://koobera.math.uic.edu/www/qmail.html
The previous patch is currently available at:
http://www.qmail.org/http://www.qmail.org/procmail-maildir-patch
Summary: this patch allows procmail to attempt to deliver to qmail-style
maildir's if a mailbox name ends with a directory separator (ie "/").
If the named mailbox does not exist, a maildir directory tree is
created.
Note: If the mailbox name does not end with a directory separator, or
the named mailbox exists as a file or as a directory without the
maildir-style cur/new/tmp subdirectories, delivery proceeds as it would
have without this patch.
As with similar software like this, this patch comes with no implied or
stated warranties or guarantees. Do not annoy Stephen R. van den Berg
with problems with this patch, as he did not write it. Mail me if you
have any problems or suggestions about it.
--
Bruce Guenter, QCC Communications Corp.
Phone(work): (306)249-0220 Fax: (306)249-5128
E-Mail: bruceg(_at_)qcc(_dot_)sk(_dot_)ca WWW: http://www.qcc.sk.ca/~bguenter/
procmail-maildir.patch
Description: Text document