[Dovecot] director userdb problem [solved]

Костырев Александр Алексеевич a.kostyrev at serverc.ru
Sun Jun 10 14:30:49 EEST 2012


Faxe on #dovecot helped me:
iterate_query = select MBOX_NAME AS username from M_MAILBOX; with no where clause

sorry for wasting your time.


--
С уважением,
Костырев Александр
системный администратор
ЗАО "Сервер-Центр"
тел.: (423) 262-02-62 (доб. 2037)
факс: (423) 262-02-10
a.kostyrev at serverc.ru
icq: 404-198-497


-----Original Message-----
From: dovecot-bounces at dovecot.org [mailto:dovecot-bounces at dovecot.org] On Behalf Of Костырев Александр Алексеевич
Sent: Sunday, June 10, 2012 10:05 PM
To: dovecot at dovecot.org
Subject: Re: [Dovecot] director userdb problem

It seemed I had to add something like that in dovecot-sql.conf
iterate_query = select MBOX_NAME AS username from M_MAILBOX WHERE MBOX_NAME = '%n';

so I did but I'm still getting no usernames

so I enabled general_log in mysql

that what I get:
select MBOX_NAME AS username from M_MAILBOX WHERE MBOX_NAME = ''

It seems like direcotor don't expand variables, I've tried both -  %n and %u - nothing
any help ?




-----Original Message-----
From: dovecot-bounces at dovecot.org [mailto:dovecot-bounces at dovecot.org] On Behalf Of Костырев Александр Алексеевич
Sent: Sunday, June 10, 2012 9:49 PM
To: dovecot at dovecot.org
Subject: [Dovecot] director userdb problem

hello !

I'm trying to get users from dovecot director server:
doveadm director map
doveadm(root): Error: User listing returned failure
doveadm(root): Error: user listing failed
user                                                                mail server ip expire time        
<unknown>                                                           192.168.5.101  2012-06-10 21:54:06

in logs I get:
Jun 10 21:41:14 mail-lvsm dovecot: auth-worker(17510): mysql(172.5.14.1): Connected to database EXIM
Jun 10 21:41:14 mail-lvsm dovecot: auth-worker(17510): Warning: mysql: Query failed, retrying: Table 'EXIM.users' doesn't exist
Jun 10 21:41:14 mail-lvsm dovecot: auth-worker(17510): Error: sql: Iterate query failed: Table 'EXIM.users' doesn't exist (using built-in default iterate_query: SELECT username, domain FROM users)

in my dovecot.conf I have:
userdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf
}
passdb {
  driver = static
  args = proxy=y nopassword=y
}
and in /etc/dovecot/dovecot-sql.conf:
user_query = select MBOX_NAME AS user from M_MAILBOX WHERE (MBOX_NAME = '%u');

Do I have to use special table named users ? is it hard-coded?




More information about the dovecot mailing list