dovecot director redirect some user to always same backend
Hello list
I have a question on how to enforce certain user(s) always to the same backend in a dovecot setup with director. So I changed my passdb-mysql query
SELECT password AS password, username AS destuser, 'Y' as proxy, (CASE username WHEN LIKE 'user' THEN '10.66.99.6' ELSE null END) as host from mailbox WHERE username = '%u' AND active = 1;
But then I saw in the dovecot manual that the director does nothing if the passdb query already returns a host field. So I'm quite unsure whether a host field with value NULL means that the host field is not present and therefore the director should insert it into the result or not.
Thanks
tobi
On 21 Jan 2016, at 16:04, Tobi <tobster@brain-force.ch> wrote:
Hello list
I have a question on how to enforce certain user(s) always to the same backend in a dovecot setup with director. So I changed my passdb-mysql query
SELECT password AS password, username AS destuser, 'Y' as proxy, (CASE username WHEN LIKE 'user' THEN '10.66.99.6' ELSE null END) as host from mailbox WHERE username = '%u' AND active = 1;
But then I saw in the dovecot manual that the director does nothing if the passdb query already returns a host field. So I'm quite unsure whether a host field with value NULL means that the host field is not present and therefore the director should insert it into the result or not.
NULL as host doesn't actually return the host field. So the above should work.
participants (2)
-
Timo Sirainen
-
Tobi