[Dovecot] director map and mysql
hello!
Is "doveadm director map" command suppose to work when I store "host" value in mysql table? It gives me nothing in output with no errors in log.
I've successfully setup directors with static passdb, and decided to give a try setup with storing host value in mysql table. The proxying is actually working, I'm just unhappy with no output from "doveadm director map".
on the other hand output from "doveadm director map" is not empty, when I configure my password_query not to return host from table.
director's settings in dovecot.sql is:
passdb { driver = sql args = /etc/dovecot/dovecot-sql.conf } userdb { driver = sql args = /etc/dovecot/dovecot-sql.conf } director_servers = 192.168.5.125 director_mail_servers = 192.168.5.110 192.168.5.111 service doveadm { inet_listener { port = 24245 } } protocol doveadm { auth_socket_path = director-userdb } doveadm_proxy_port = 24245
in /etc/dovecot/dovecot-sql.conf at director there's
password_query = SELECT
NULL AS password,
'Y' as nopassword,
'Y' AS proxy,
MBOX_NAME as user,
host2 as host
from M_MAILBOX
where MBOX_NAME = '%u'
user_query = SELECT
MBOX_NAME AS username,
MAIL_DIRECTORY as home
from M_MAILBOX
where MBOX_NAME = '%u';
iterate_query = select MBOX_NAME AS username from M_MAILBOX;
backend's conf: service doveadm { inet_listener { port = 24245 } }
On 20.6.2012, at 5.03, Костырев Александр Алексеевич wrote:
Is "doveadm director map" command suppose to work when I store "host" value in mysql table? It gives me nothing in output with no errors in log.
If you return a host for a user, then Dovecot does regular proxying and director doesn't know anything about the user.
thanks!
but what mechanisms do I have if I want certain user to be always proxied to certain host, but if that host is down, to redirect him to another?
I planned to setup two dovecot storage servers where all mailboxes are mirrored between these two servers with dsync replication like described in http://www.dovecot.org/list/dovecot/2012-March/064243.html but I don't want this user to be redirected to two these servers in round-robin fashion.
-----Original Message----- From: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of Timo Sirainen Sent: Wednesday, June 20, 2012 1:22 PM To: Костырев Александр Алексеевич Cc: dovecot@dovecot.org Subject: Re: [Dovecot] director map and mysql
On 20.6.2012, at 5.03, Костырев Александр Алексеевич wrote:
Is "doveadm director map" command suppose to work when I store "host" value in mysql table? It gives me nothing in output with no errors in log.
If you return a host for a user, then Dovecot does regular proxying and director doesn't know anything about the user.
On Wed, 2012-06-20 at 14:40 +1100, Костырев Александр Алексеевич wrote:
but what mechanisms do I have if I want certain user to be always proxied to certain host, but if that host is down, to redirect him to another?
You'll have to mark the host down in SQL, and change your SQL query to return something else for the "host" value when that host is down (either another host or NULL to let director handle it).
participants (2)
-
Timo Sirainen
-
Костырев Александр Алексеевич