[Dovecot] Using MySQL to store email?

Timo Sirainen tss at iki.fi
Wed Jun 7 14:44:25 EEST 2006


On Tue, 2006-06-06 at 05:38 -0700, Marc Perkel wrote:
> Have you considered the idea of storing all the email in a MySQL 
> database? Seems to me that MySQL could somplify all the backend stuff 
> that everyone struggles with and with replication one could create very 
> massive and reliable systems. What would it take to use MySQL that way?

I'm not against Dovecot supporting SQL backend. I've even started coding
it a couple of times. But I don't think it's really all that great idea,
at least from performance point of view. Dovecot's current indexes are
highly optimized for what IMAP server needs to do, and SQL just doesn't
support many such features in any efficient way.

As for faster searching, the problem with that is still the same as I
mentioned a month or so ago: A fully compliant IMAP server can't use any
normal full text search indexers to implement SEARCH command. I'm still
going to add some search extension which does allow doing this and
Dovecot will have fast full text search support, without requiring a SQL
database.

An SQL database might be a good idea if your client (eg. webmail) used
it directly and the database's schema was specifically designed for the
client. But for IMAP server which needs to be able to do many things and
restricted by the way the IMAP RFC requires things to be done, SQL just
sucks.

Also I think others already mentioned that MySQL's replication allows
only read-only slaves, which I don't think helps all that much. As for
multi-master replication, what databases really support that? I think
with Oracle it supports it only when the filesystem itself is already
shared between the computers, and Dovecot already supports running in
shared filesystems, so Oracle would be just extra overhead there.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20060607/4a0efae5/attachment.pgp


More information about the dovecot mailing list