[Dovecot] mail-sql update

Rick Romero rick at havokmon.com
Mon Nov 12 20:14:05 EET 2007


On Mon, 2007-11-12 at 20:07 +0200, Timo Sirainen wrote:
> On Mon, 2007-11-12 at 16:27 +0000, Daniel Watts wrote:
> > > SQL backend has been possible for a long time and there's already
> a
> > > kind-of working version available:

> > Hey that's cool - didn't realise this was available . Timo what is your 
> > own opinion of sql based mail storage vs maildir (or dbox)? When is it a 
> > good idea?
> 
> I don't really know. Maybe if you want to use the mail database for
> something special. Performance definitely isn't a reason.
> 
> I'm not sure if this would allow multi-master replication though. I know
> MySQL offers support for it, but what happens when both masters have
> added a row that causes a unique key collision? Can you write triggers
> to fix those cases automatically?

It's taken care of in Mysql 5.0.  There's a couple settings:
auto_increment_increment = 10
auto_increment_offset = 1
auto_increment_offset = 2 (for other master)

to keep keys assigned by the servers from colliding.
Here's a link I was just checking out today..
http://capttofu.livejournal.com/1752.html?view=20440#t20440

If mail-sql was efficient, I'd love to go that route - imagine disaster
recovery, or even geographical load balancing,  being as easy as adding
another replication master....

Rick









More information about the dovecot mailing list