[dev] IMP/IMAP/MIME Update

Michael M Slusarz slusarz at horde.org
Wed Oct 22 06:21:07 UTC 2008


Just wanted to give a quick update on where I am with the whole
IMAP/MIME rewrite.

Client lib: Reaching the stage where most of the development time here
is focused on fixing bugs, tweaking performance, and tightening up
behavior.  Spent most of today working on the message caching code.  By
default we will cache envelope information, structure (stored as a
MIME_Message object), size, and date.  If the CONDSTORE extension is
available on the server, we will also be able to support flag caching
(still working on the details of this one).

Further caching will be available in the future when I implement the
QRESYNC extension.

As far as testing, I currently have access to the following servers
(it's quite a sight to see my virtual test machine running IMAP servers
on ~10 ports :)):
Cyrus 2.3.12
Dovecot 1.1
Dovecot 1.2 (alpha)
Exchange 2003
Exchange 2007
BincImap 1.3.4
Courier 4.4.1
Archiveopteryx 3.0.2
UW-imap 2007b

So, in other words, pretty much every freely available server out
there.  If there are other servers out there I should try, please let me
know.

Thoughts after testing these servers?  Dovecot is fast, BincImap is
broken, Exchange is woefully lacking in supporting IMAP extensions,
Cyrus & UW-imap performs a lot better than I thought it would, and
Courier IMAP is glacial (for a test that takes 0.3 secs for Dovecot to
finish, it takes 15+ secs for Courier - and caching can't be the reason
either since the test_client.php script only deals with mailboxes
containing ~5 messages).

IMP integration: I have rewritten much of the IMAP login code to support
the fact that we can hide a lot of the config details in the
Horde_Imap_Client object.  Now, starting up the session is a matter of
unserializing that object from the session and calling login() in Auth_imp.

I've converted all of the folders page to work with the new library. 
The mailbox page now views messages fine, although I haven't started to
play with the various message actions yet.  Message viewing doesn't work
- MIME_Contents needs to disappear before that can happen.  I think I am
simply going to try to merge all of MIME_Contents into IMP_Contents and
get it working for now, and then work on message UI generation more in
the future once the rest of IMP stabilizes.

IMP_Headers, IMP_IMAP_Cache, IMP_IMAP_Client, and IMAP_MessageCache have
all been removed.

Configuration of IMAP servers has been greatly simplified (yay!)  No
more imap/tls/no-validate-cert crap anymore.  Also, we have easy access
to debugging the IMAP traffic to the server via a new 'debug'
parameter.  Debugging & caching are now configurable per server (as
opposed to system wide as in IMP 4).

Framework: As mentioned elsewhere (on the wiki), the changes in IMP
require a complete revamp of the MIME and IMAP framework libraries.  For
the IMAP library, everything is gone except for IMAP_ACL.  All features
have either been moved to Horde_Imap_Client or are no longer needed. 
For MIME, many c-client specific code needed/needs to be removed.  It is
quite invasive and annoying :(  MIME_Structure no longer exists,
MIME_Contents is soon to no longer exists, and MIME_Headers has been
completely rewritten and is much slimmer.

Short conclusion: not ready for prime-time yet so there is (at a
minimum) a few more weeks before I expect to reach a point where I will
be ready to commit.  Then again, with the new git repository taking
shape, this might be the time we want to start work on IMP in it.

michael


More information about the dev mailing list