[Dovecot] allow_nets and mysql question
Alex Samorukov
ml at os2.kiev.ua
Tue Oct 17 07:14:53 UTC 2006
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 at 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 at example.com'
auth-worker(default): auth(testuser at example.com,10.0.0.1): allow_nets:
Matching for network 193.193.193.100/32
auth-worker(default): passdb(testuser at example.com,10.0.0.1): allow_nets
check failed: IP not in allowed networks
auth(default): client out: OK 1 user=testuser at example.com
auth(default): master in: REQUEST 1 65787 1
auth(default): master out: USER 1 testuser at example.com
mail=/usr/local/vdomains/example.com/users/testuser/Maildir/
uid=1005 gid=6
pop3-login: Login: user=<testuser at example.com>, method=PLAIN,
rip=10.0.0.1, lip=10.0.0.1, secured
POP3(testuser at example.com): Effective uid=1005, gid=6
POP3(testuser at example.com): maildir:
data=/usr/local/vdomains/example.com/users/testuser/Maildir/
POP3(testuser at 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 at example.com): Disconnected: Logged out top=0/0, retr=0/0,
del=0/7, size=1362269
More information about the dovecot
mailing list