[Dovecot] MySQL as a storage only.?

Seth Mattinen sethm at rollernet.us
Tue Dec 23 20:00:16 EET 2008


Jack Stewart wrote:
> 
> Neil wrote:
>> On Tue, Dec 23, 2008 at 2:20 AM, Timo Sirainen <tss at iki.fi> wrote:
>>> On Dec 23, 2008, at 4:51 AM, R A wrote:
>>>> Especially if you try
>>>> to implement cloud-like services, where you have the possibility of
>>>> links temporarily going down between servers, and mail can come in to
>>>> any point, and be retrieved or moved at any point.
>>>>
>>>> You really need transactions then, to track every mails change in time,
>>>> and to replicate those when you get connectivity back. You "can"
>>>> possibly do it by tracking dovecot logs and do the replication yourself
>>>> with scripts, but using a database would probably be easier here.
>>> I've also planned easy replication support for Dovecot. Also I don't 
>>> think
>>> doing the SQL replication correctly and without losing any data on error
>>> conditions is as easy as you think.
>>>
>> +1
>> Needless to say, replication would be _very_ useful...
> 
> At least in 5, MySQL replication is very difficult. Based on my 
> experience with amavisd, master <-> master replication does not work if 
> you have foreign key constraints. master <-> slaves can have issues with 
> high activity as a key on the master might get update while a search is 
> happening on the slave (again this is with foreign key constraints). 
> Then you'll probably need innodb for performance so backups become more 
> challenging. Lastly, disk usage triples.
> 
> Hate to be a wet blanket, but this is what I've seen. If you don't need 
> the constraints, the problem becomes more manageable. Still your safest 
> bet for replication at this time is to use the slave as a backup with 
> some sort of auto promotion mechanism. The network master daemon (nmdb?) 
> looks promising for straight forward databases.
> 
> Don't forget blob sizing.
> 
> I'm not sure how Oracle is for replication. Setups/configuration does 
> not sound simple from the dba's I've talked to, although RACK looks decent.
> 
> MySQL does work well for index problems (i.e. searches) where the index 
> can be reconstructed if their is a failure and the searching process 
> doesn't seize in a failure.
> 
> Just my opinion and warning.
> 

I agree with you from my own experience - using a database in this 
manner is a huge kludge. maildir/dbox is far better suited for mail 
storage. For small installations where there is little mail storage and 
performance is not an issue, maybe. But I'd rather see Timo's time spent 
on an internal to dovecot master-slave and master-master system.

~Seth


More information about the dovecot mailing list