[Dovecot] proxy_maybe regex

Timo Sirainen tss at iki.fi
Mon Feb 1 22:34:54 EET 2010


On 1.2.2010, at 22.33, Timo Sirainen wrote:

> You can use SQLite. You don't even need an actual database. Something like (completely out of my head, no idea how to do it in reality):
> 
> password_query = select \
>  (if '%u' regexp '^[a-d]' then '192.168.xxx.1' else \
>  if '%u' regexp '^[e-k]' then '192.168.xxx.2' else \
>  ..) as proxy_maybe

Oh, v2.0 finally supports DNS lookups too. So you could use:

password_query = select substr('%u', 1, 1) || '.domain.org' as proxy_maybe, ..

and add [a-z].domain.org to DNS.



More information about the dovecot mailing list