[Dovecot] How can I configure dovecot as gmail imap proxy

Timo Sirainen tss at iki.fi
Wed Jan 20 11:11:33 EET 2010


On 20.1.2010, at 8.17, Supratik Goswami wrote:

> Here the proxy server should authenticate the user. If the user is in the
> list of
> authenticated users then dovecot will allow to connect to imap.gmail.com.

So you first need a way to redirect all imap.gmail.com connections to dovecot proxy. "Transparent proxy" is the correct google keyword for this, but I've never done one myself.

Then you need the actual Dovecot proxy configuration. Where were you planning on keeping the usernames? With SQL you could do something like:

password_query = SELECT NULL as password, 'y' as nopassword, 'y' as proxy, '209.85.135.111' as host from users where username = '%u'

Dovecot proxy doesn't currently support DNS lookups, so you need to return one of imap,gmail.com's IP addresses directly.


More information about the dovecot mailing list