The imap server (From the all the code in maildir.c) never changes
a message. The only thing it changes is flags which are file name
changes.
The question is what sort of performance gain would you get using a
database alongside (Assuming you can't use locking so you have to copy
the entire thing for every update you want to make to the database)
When you make your local copy should you use that copy for the entire
session of the imap and only copy it back when you are done (or do some
sort of checkpointing of moving it back every 10 minutes or so) Or
copy/move it for every single change?
How big would the database get with about 1000-2000 messages.
I guess the only way to know for sure is to write the code and measure the
perfomance, but any ideas? Would it really help?
I can help write the code (or write it) if people think it might speed
things up... I have already tweaked the UW/Imap code to split the Maildir
cur directory into 10 sub directories so that each sub directory has a
balanced number of messages in it. (This increases speed for flag changes
significantly since flag changes are filename changes, which if you have
5000 files in a single directory can be time consuming :) The next step
would be to use a database for UID/Header/Flag data. Where the Maildir is
still an "Authority" on the data but there is a helper database that can
be consulted.
-d.
On Mon, 16 Aug 1999, David Harris wrote:
>
> Jeff Hayward [mailto:[EMAIL PROTECTED]] wrote:
> > Forgive my ignorance of this IMAP issue, but does the IMAP spec
> > permit a mail message to be modified (excluding flags) without
> > assigning it a new UID? If not, there is no need for stat as long
> > as the maildir file name changes.
>
> Hey, you are right!
>
> I don't know much about the nitty-gritty details of the IMAP protocol, so I
> just did a test. I'm using Outloook 98 as my IMAP client, and the server is the
> latest RPM available from www.davideous.com/imap-maildir/
>
> I setup a maildir with one message:
>
> $ md5sum `find Maildir -type f`
> b862d13ec755ade64c204f83ca994e48
> Maildir/cur/934827988.10150.hobbes.drh.net:2,S
> d41d8cd98f00b204e9800998ecf8427e Maildir/.uidvalidity
>
> Then modified that message and saved the changes, and this is how the maildir
> looked:
>
> $ md5sum `find Maildir -type f`
> b862d13ec755ade64c204f83ca994e48
> Maildir/cur/934827988.10150.hobbes.drh.net:2,ST
> c2784ffaa223c6fab44e64108a5c0536
> Maildir/cur/934842373.15905.000000000.hobbes.drh.net:2,S
> d41d8cd98f00b204e9800998ecf8427e Maildir/.uidvalidity
>
> So, I think we are guaranteed at least the IMAP client will not go changing
> the messages without changing their name.
>
> In my mind, this makes an IMAP server with a side-by-side database a real
> possibility. Any thoughts?
>
> - David Harris
> Principal Engineer, DRH Internet Services
>
>
+-----------------------------------------------------------------------+
| David Galbraith dgalb@ University Of New Mexico |
| Systems Analyst unm.edu (505)-277-8499 |
+-----------------------------------------------------------------------+