Re: director: non standart ports at backends
Timo Sirainen <tss <at> iki.fi>
2012-06-11 12:47:50 GMT
Looking at your old mails, you seem to be using passdb static for director, but userdb sql? So you could
driver = sql
args = /etc/dovecot/dovecot-sql.conf
password_query = select 'y' as proxy, 'y' as nopassword, if('%a'=143, 1430, 9930) as port
where you'd change the if() to something that handles %s=imap vs %s=pop3 vs %s=lmtp and %a=143 vs %a=993 vs
%a=110 vs %a=995. Maybe a "case" statement would be less ugly. Or simply make it a real table in sql. Anyway,
that's the basic idea.
On 11.6.2012, at 15.39, Костырев Александр Алексеевич wrote:
> thanks Timo, for you time
> but I still don't get it)
> should I return "port" with just "port_num1,port_num2" value or how?
> I've tried to google an example but with no success.
> -----Original Message-----
> From: Timo Sirainen [mailto:tss <at> iki.fi]
> Sent: Monday, June 11, 2012 11:01 PM
> To: Костырев Александр Алексеевич
> Cc: dovecot <at> dovecot.org
> Subject: Re: [Dovecot] director: non standart ports at backends
> On 11.6.2012, at 12.27, Костырев Александр Алексеевич wrote: