[Dovecot] Re: Corrupted index files in 0.99.12.1

Brady Wetherington brady at netservnyc.com
Mon Dec 13 21:26:42 EET 2004


--- dovecot-request at dovecot.org Wrote: 
> From: Matthias Andree <matthias.andree at gmx.de>
> Brady Wetherington <brady at netservnyc.com> writes:
> 
> > Would my old, corrupted index files be of any use to anyone? I still
> > have that directory sitting somewhere. Is it perhaps 'bad' to run two
> > copies of Dovecot? I don't know exactly what I was doing, but I can
> > easily imagine accessing one of my Dovecots using my webmail setup, and
> > one using straight IMAP - is that an unsupported setup?
> 
> I'd think the way to go is to use one Dovecot installation for both IMAP
> logins by remote clients as well as the webmail system.
> 
> -- 
> Matthias Andree

I would think the exact same thing, and I would _love_ to run only one
copy of Dovecot. But I run vpopmail, and I need to make IMAP available
only to users who have IMAP 'enabled' (the guys who pay more money). But
I need webmail available for _all_ users (even the cheapskates), and my
webmail of course uses IMAP behind the scenes. So my solution is one
copy of regular Dovecot on port 143, which respects the NO_IMAP flag
from vpopmail, and one copy of modified Dovecot, which I patched to
ignore the NO_IMAP flag, on port 144 - and then I configured my webmail
software to talk to port 144. That copy of Dovecot will eventually only
listen to the local network for connections, though currently it listens
for anyone.

A solution I already tried was having Dovecot run by being invoked from
a copy of tcpserver, which used a .cdb 'rules' database which set
certain environment variables based upon the users IP address. I patched
my copy of Dovecot to listen for those environment variables and pay
attention/ignore NO_IMAP based upon those environment variables, but it
looks like environment variables get clobbered when dovecot invokes the
authenticator process from within imap-login (And the code seems to say
that it blows out the environment, too). And I'm willing to bet that it
would only work on first invoke of dovecot from imap-login, too, even if
it didn't blow out the environment (because the authentication process
stays running).

All this stuff is, I'm sure, a thousand times easier in something like
courier-imap, but I like Dovecot, so I'd rather run two copies of
Dovecot than one of courier-imap.

So if anyone has any possible direction to go on a solution that lets me
run only one Dovecot, I'd love that. Until then, I'm stuck with my
hack-ey two-Dovecot solution. 

I also _think_ I found out the problem, what was corrupting my indexes,
though I'm not sure. I think one of the messages in my Maildir was
'unreadable' by Dovecot (well, that's what the logs say). Which seems to
completely blow out the index. I got rid of the file, so lets keep
fingers crossed that that solves it...



More information about the dovecot mailing list