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