[Dovecot] Proxying for some users and having the rest local?

Dr Josef Karthauser joe at tao.org.uk
Mon May 7 22:21:13 EEST 2012


I'm migrating a load of mailboxes from cyrus to a new dovecot server.

What I'd like to do is to switch the DNS to dovecot, and set things up so that all old imap mailboxes are accessed through the dovecot proxy. That way I can migrate them one at a time independent of DNS issues.

I've got a load of users specified in mysql, and that configuration works well for local mailboxes.

How do I configure things so that I can switch proxy access on and off?

What's I've got so far is:

   password_query = SELECT user, domain, password, "masteruser" as master, "masterpass" as pass, proxy, "remoteimap.server" as host FROM mailboxes \
       WHERE user = '%n' AND isMailbox AND active AND domain = '%d'

I imagined that I could switch the proxy per user by setting proxy='n' or proxy=null for any users that want to be local, and proxy='y' for any users that I want to forward on to the original server.

It doesn't appear to work that way though. Irrespective of the proxy value dovecot appears to try and proxy all users.

What am I doing wrong? I can't work it out from the docs, and the source will take quite a bit of studying to get to the bottom of it all.

Thanks :),
Joe






More information about the dovecot mailing list