On 13.12.2004, at 21:26, Brady Wetherington wrote:
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).
You could do this by first getting the remote IP address transferred to dovecot-auth (http://dovecot.org/patches/pam-rhost.patch) then checking the IP in vpopmail code to see if you want to check NO_IMAP with the IP.
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...
If there's a repeateable way to break Dovecot with some specific message even after indexes have been recreated, I'd like to see the message.
Unless, of course, you meant that 'unreadable' was because there was no file system permissions to read it?