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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20160121/3257c77a/attachment.sig>
Timo Sirainen
2016-Jan-22 11:51 UTC
dovecot director redirect some user to always same backend
> On 21 Jan 2016, at 16:04, Tobi <tobster at 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.