imap-maildir: production quality UW-imap server Maildir support

Available for consulting work
I am currently available for consulting work. For consulting,
I am happy to telecommute or come to your site for a period of time.
For more information about my skills and experience,
view my statement of consulting capabilities
or contact me for more information.

Quick SummaryUnless you have a specific need to continue using UW-IMAP, this patch is obseleted
by the deveopment of better IMAP servers like courier-imap, dovecot, and bincimap.

The University of Washington IMAP server by Mark Crispin, one of the most
popular IMAP servers, does not have built-in Maildir support. There is a patch
which adds in a Maildir driver, but it falls short of a workable solution in
a few ways. This page details a few patches which clean up a few issues and
make the UW-IMAP server fully workable with Maildirs and qmail.

Looking for a new maintainer for these patches!!
I'm looking to find someone else to maintain these patches. I created these patches
for my own personal use and then placed them online for the community to benefit. I'm no
longer actually using the patches anymore and can't find the time to perform the maintenance
and support that they need. If you are interested in maintaining the patches,
e-mail me. Thanks!

1. Description

There are two main problems with using the current Maildir support patch with
the University of Washington IMAP server:

New folders are created as Mbox folders, not Maildir folders.

Moving mail between Mbox folders and Maildir folders causes an
error because the code in the Maildir driver to move messages between
folders of different formats (which I understand is a substantial
chunk of work) was never written.

These two problems lead to a server setup where one can not move mail from the
INBOX to any other user-created folders. This basically prevents the UW IMAP
server from being used in a production environment with Maildirs.

However, I have created two patches which sit on top of the Maildir driver patch
in the UW-IMAP server which, in my opinion, make Maildir support workable.

The patches simply commit the user to only using Maildir folders. This way
the driver inadequacy of not being able to move messages between different-type
folders is simply never felt. If you don't mind committing to Maildirs, then
this should work for you in a production environment.

Here are the patches that I created:

imap-4.5-createproto.patch
This causes new folders to be created as Maildirs if the user's
INBOX folder is a Maildir. Otherwise the folders are created as the
system default of Mbox folders.

imap-4.5-mdirlist.patch
If the user's INBOX folder is a Maildir, then when the client uses the
IMAP LIST command to list all the possible folders, we only
call the Maildir driver's list method. This helps prevent the user
from opening any non-Maildir folders which may exist. In addition, the Mbox driver
list method recursively shows every single file in the user's home directory as a
possible mailbox, so this patch is also good because it gets rid of
all that clutter. Which can be quite a bit if you have lots of messages
in the Maildirs.

imap-4.5-maildir980721-rename.patch
This fixes a bug in the maildir driver which prevented Maildir folders from
being renamed.

imap-4.5-maildir980721-delete.patch
This fixes a bug in the maildir driver which did not fully delete Maildir folders.

I also use the following patch which someone else (I don't know who) created:

imap-4.5-qmail.patch
This causes the Mbox driver to look for the INBOX in the standard
qmail location of ~/Mailbox
instead of in the system mail spool (which is /var/spool/mail/$USER
on my system). The Maildir driver naturally looks in the standard qmail
location of ~/Maildir.

Of course, all this is in addition to the Maildir driver patch.

2. Distribution & Installation

Note on version numbersThese patches were originally build for UW-IMAP sever version 4.5, but they have been
successfully applied to versions 4.6 and 4.7a without any modification. As of late, I have been
too busy try these myself or to create a new RPM file for the new versions.

NOTE: The patch above was origionally at "http://www.freeit.com/mta/maildir980721.patch.gz"
(that site is now gone), but I had some problems applying their patch to the IMAP server source tree
and had to hand-apply
some of it. So you don't have to go through the same trouble, I re-made their patch to cleanly apply
to the imap-4.5.tar.Z source tree. However, note that this is still THEIR WORK, just in a different
format produced by me. (The extension drhfu stands for drh fix up.)

This RPM is the imap-4.5-3 RPM that came with RedHat Linux 6.0 with the above patches
applied. It is a drop-in replacement for the RPM which ships with RedHat.
I don't know if this will work on non RedHat-based Linux systems, but you
are free to give it a try.

Also, if you build an RPM for another architecture, please send me a copy so I can post it here.

Note for RedHat 5.x users
As I understand it, most RPM's built on a RedHat 6.0 system,
as these are, do not work on a RedHat 5.x system. However, may be possible to download the source
RPM and re-build on a 5.x system using the --rebuild flag. Please let me know if
this works for you.

In the distrib/imap-4.7 directory you will
find updated patches and files for imap-4.7. David Summers has also created an RPM
file for Red Hat 6.2 and the imap-4.7 server that you an also find in that directory.
Be sure to read the README to know what everything is!

I apologize for not having the time to properly update this site and change all of the links
above.

New patch for Imap-2000c

This is a port of all my patches for the UW-IMAP server imap-2000c found
here.

Thanks to Herbie for updating the patches for the latest UW-IMAP version.

10-digit unix date rollover problem

On 9 Sep 2001 01:46:40 GMT the UNIX time_t value hit one billion and thereby
all new dates sort before all the previous time_t values. This causes problems with the
sorting routine in the imap-maildir code. Use this patch to fix your existing
installations:

I had written a maildir patch for the newest version of UM-Imap
2004c1. It is developed by referring to Herbie's patch. The maildir.c
and maildir.h is completely the same as Herbie's one. I'd already
tested it with qmail-1.03 using maildir on Redhat 7.3 system. Attached
with the patch for you to put on http://www.davideous.com/imap-maildir/