[Dovecot] Upgrading a live running dovecot - how?

Timo Sirainen tss at iki.fi
Sun Jan 6 03:33:25 EET 2008


On Sun, 2008-01-06 at 01:05 +0000, Ed W wrote:
> Daniel Watts wrote:
> > Hi Guys,
> >
> > This has bitten us twice now. We're running Gentoo and emerge (ie 
> > compile) a new version of Dovecot thinking we can finish that then 
> > restart Dovecot in our own time.
> >
> > It seems that Dovecot immediately starts to use the newly compiled 
> > Dovecot binary and we get version mismatch errors preventing access.
> >
> > Would be good if Dovecot behaved in such a way that it kept on using 
> > the old version (held in memory) until it was restarted where it then 
> > loaded the new version.
> 
> I think if you read the section on pre-init scripts you can see that the 
> way dovecot works is something like to keep long term auth processes, 
> but to fork a new server process for each user.  So I guess each login 
> will instantly see the new binary...

This is correct. I can't really think of any reasonable way to keep
using old binaries. But it is possible to use version_ignore=yes and
it'll most likely work just fine.

Although I had been thinking about using some kind of imap-forker
processes for improving performance. So that you'd have one permanent
imap process that has already initialized itself by loading all plugins
and such. It would be waiting for new (post-login) connections, and when
it sees one it just forks itself to handle it.

That won't anyway happen before v2.0, and I'm not sure if it's even then
a good idea. It has some potential security issues .. like you have to
be careful to reseed the random number generators for all new
connections. Also if address space layout randomization is used, it's
the same for all imap processes which isn't very good.
-------------- 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/20080106/1093203f/attachment.bin 


More information about the dovecot mailing list