[EMAIL PROTECTED] wrote:
> I have come across mention in this list's archive about using a MySql
> database as a mail store for webmail, leaving IMAP out of the loop
> completely. Is this possible and, if so, what are the limitations? Anyone
> using such a setup?
>
We started out using just that setup, and it worked very well. Being able to
use the flexibility of SQL to do sorts and searches was just great. However,
we then wanted to provide our users with access to their mail with POP and
IMAP, so we had to switch to an IMAP server instead. Another approach could
have been to patch Cyrus to use our SQL backend as a data store, but we
didn't go down this route.

If you do go with the MySQL solution, I suggest limiting the message size
you stick into DB fields directly. We used a 64k text field to store
messages, and messages over this size we stuck in the filesystem directly
and popped the path to the message into a field in the DB. The only downside
was that when people searched for a message for body content, these large
message were not included. Oh, and the other clever thing IIRC we did was to
parse the MIME structure when we received the message and store the
attachments on the filesystem, and only the inline body in the DB. This
helped speed up searches too.

You can probably see now why we didn't implement a SQL backend to
Cyrus--trying to support this more complex data structure would be
non-trivial. But for our webmail it was ideal--it was pretty cool that
messages larger than 64k simply appeared as text attachments rather than
inline, since for modem users that meant avoiding long waits.

HTH,
  Jeremy


Reply via email to