[Dovecot] allow_nets and mysql question
Hi.
I want to use allow_nets in my configuration, but i have some troubles
which i cant resolve.
To use allow_nets i creates allow_nets
text field in my mysql users
table. My query is:
from: dovecot/sql.conf:
password_query = SELECT crypt as password, maildir as userdb_mail, 6 AS userdb_uid,6 AS userdb_gid, allow_nets FROM users WHERE id = '%u'
from dovecot.conf: auth default { mechanisms = plain passdb sql { args = /usr/local/etc/dovecot/sql.conf } userdb prefetch { } user = root }
To check this i added address 193.193.193.100/32 (which is not my address) and tried to connect from localhost (using telnet). And it allow me to connect! May be i did something wrong, but i cant explain this, so i`m asking for your help. Here is debug information:
Dovecot v1.0.rc10 starting up auth-worker(default): mysql: Connected to localhost (maildb) auth(default): client in: AUTH 1 PLAIN service=POP3 secured lip=10.0.0.1 rip=10.0.0.1 resp=<hidden> auth-worker(default): sql(testuser@example.com,10.0.0.1): query: SELECT allow_nets,crypt as password, maildir as userdb_mail, 1005 AS userdb_uid,6 AS userdb_gid FROM users WHERE id = 'testuser@example.com' auth-worker(default): auth(testuser@example.com,10.0.0.1): allow_nets: Matching for network 193.193.193.100/32 auth-worker(default): passdb(testuser@example.com,10.0.0.1): allow_nets check failed: IP not in allowed networks auth(default): client out: OK 1 user=testuser@example.com auth(default): master in: REQUEST 1 65787 1 auth(default): master out: USER 1 testuser@example.com mail=/usr/local/vdomains/example.com/users/testuser/Maildir/ uid=1005 gid=6 pop3-login: Login: user=testuser@example.com, method=PLAIN, rip=10.0.0.1, lip=10.0.0.1, secured POP3(testuser@example.com): Effective uid=1005, gid=6 POP3(testuser@example.com): maildir: data=/usr/local/vdomains/example.com/users/testuser/Maildir/ POP3(testuser@example.com): maildir: root=/usr/local/vdomains/example.com/users/testuser/Maildir, index=/usr/local/vdomains/example.com/users/testuser/Maildir, control=, inbox= POP3(testuser@example.com): Disconnected: Logged out top=0/0, retr=0/0, del=0/7, size=1362269
Alex Samorukov wrote:
Hi. I want to use allow_nets in my configuration, but i have some troubles which i cant resolve. To use allow_nets i creates
allow_nets
text field in my mysql users table. My query is:from: dovecot/sql.conf:
password_query = SELECT crypt as password, maildir as userdb_mail, 6 AS userdb_uid,6 AS userdb_gid, allow_nets FROM users WHERE id = '%u'
from dovecot.conf: auth default { mechanisms = plain passdb sql { args = /usr/local/etc/dovecot/sql.conf } userdb prefetch { } user = root }
I tried to change userdb from "prefetch" to "sql" but this change nothing. It seems that result of the allow_net checking simply ignored :(
To
On Tue, 2006-10-17 at 09:14 +0300, Alex Samorukov wrote:
Hi. I want to use allow_nets in my configuration, but i have some troubles which i cant resolve.
Looks like it was broken with MySQL (and only with MySQL..), fixed:
http://dovecot.org/list/dovecot-cvs/2006-October/006618.html
Timo Sirainen wrote:
On Tue, 2006-10-17 at 09:14 +0300, Alex Samorukov wrote:
Hi. I want to use allow_nets in my configuration, but i have some troubles which i cant resolve.
Looks like it was broken with MySQL (and only with MySQL..), fixed:
http://dovecot.org/list/dovecot-cvs/2006-October/006618.html
Thanks. I applied this patch to the dovecot rc10 and now all work just fine, thank you :)
participants (2)
-
Alex Samorukov
-
Timo Sirainen