[Dovecot] mysql index control allow nets
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
hi,
I am using dovecot 1.0.13 with sieve plugin, index, control and allow nets in my userdb per user.
I am trying to have the same configuration with dovecot 1.1 and MySQL. According to log files when a virtual user is connecting to dovecot, the dovecot reads from MySQL the correct values but dovecot doesnt create the dirs for INDEX, CONTROL and the allow_nets is bypasses.
- From my logs : dovecot: May 14 20:56:23 Info: auth(default): master out: USER 12 ebalaskas@ebalaskas.gr uid=1002 gid=8 mail=maildir:/var/mail/ebalaskas.gr/ebalaskas INDEX=/var/mail/.index/ebalaskas.gr/ebalaskas CONTROL=/var/mail/.control/ebalaskas.gr/ebalaskas allow_nets=10.10.10.192
The connection is ok (i tested via telnet and webmail) but my IP is : 10.10.10.102 and there isnt any /var/mail/.index/ebalaskas.gr/ebalaskas or /var/mail/.control/ebalaskas.gr/ebalaskas folders
The only thing is the folder : var/mail/ebalaskas.gr/ebalaskas
the dovecot-sql.conf is correct (you can see this from my logs) so what is wrong ???
Evaggelos Balaskas - http://ebalaskas.gr Unix System Engineer Informatics Engineer Technological Education -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIKykUWIK+Pe9twhoRAhemAJ0ff793TAsqhDhrAZ7pbATLmDrJggCfXjDZ Cfiojr0LoJc0Vtif6XjfoTs= =Jeph -----END PGP SIGNATURE-----
On Wed, 2008-05-14 at 21:01 +0300, Evaggelos Balaskas wrote:
I am trying to have the same configuration with dovecot 1.1 and MySQL. According to log files when a virtual user is connecting to dovecot, the dovecot reads from MySQL the correct values but dovecot doesnt create the dirs for INDEX, CONTROL and the allow_nets is bypasses.
- From my logs : dovecot: May 14 20:56:23 Info: auth(default): master out: USER 12 ebalaskas@ebalaskas.gr uid=1002 gid=8 mail=maildir:/var/mail/ebalaskas.gr/ebalaskas INDEX=/var/mail/.index/ebalaskas.gr/ebalaskas CONTROL=/var/mail/.control/ebalaskas.gr/ebalaskas allow_nets=10.10.10.192
There seem to be spaces between mail/INDEX/CONTROL? They're supposed to be separated by ':', not spaces.
allow_nets is supposed to be in password_query, not in user_query.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Timo thanks again, allow_nets worked perfectly INDEX and CONTROL are now with delimiter :
here is my log :
dovecot: May 15 17:01:44 Info: auth(default): master out: USER 3 ebal@ebalaskas.gr home=/var/mail/ uid=1108 gid=8 mail=maildir:/var/mail/ebalaskas.gr/ebal:INDEX=/var/mail/.index/ebalaskas.gr/ebal:CONTROL=/var/mail/.control/ebalaskas.gr/ebal
but there is not index nor control folder created under /var/mail
Any ideas ?
Timo Sirainen wrote:
On Wed, 2008-05-14 at 21:01 +0300, Evaggelos Balaskas wrote:
I am trying to have the same configuration with dovecot 1.1 and MySQL. According to log files when a virtual user is connecting to dovecot, the dovecot reads from MySQL the correct values but dovecot doesnt create the dirs for INDEX, CONTROL and the allow_nets is bypasses.
- From my logs : dovecot: May 14 20:56:23 Info: auth(default): master out: USER 12 ebalaskas@ebalaskas.gr uid=1002 gid=8 mail=maildir:/var/mail/ebalaskas.gr/ebalaskas INDEX=/var/mail/.index/ebalaskas.gr/ebalaskas CONTROL=/var/mail/.control/ebalaskas.gr/ebalaskas allow_nets=10.10.10.192
There seem to be spaces between mail/INDEX/CONTROL? They're supposed to be separated by ':', not spaces.
allow_nets is supposed to be in password_query, not in user_query.
Evaggelos Balaskas - http://ebalaskas.gr Unix System Engineer Informatics Engineer Technological Education -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFILEO8WIK+Pe9twhoRAmw1AJ4sRNJaHmfw+F2iBbBYFr7WbPFTvgCeNPko aRZMkLjT/WNofn7PZdMoS4s= =A+GC -----END PGP SIGNATURE-----
On May 15, 2008, at 5:07 PM, Evaggelos Balaskas wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Timo thanks again, allow_nets worked perfectly INDEX and CONTROL are now with delimiter :
here is my log :
dovecot: May 15 17:01:44 Info: auth(default): master out: USER 3 ebal@ebalaskas.gr home=/var/mail/ uid=1108 gid=8 mail=maildir:/var/mail/ebalaskas.gr/ebal:INDEX=/var/mail/.index/ ebalaskas.gr/ebal:CONTROL=/var/mail/.control/ebalaskas.gr/ebal
but there is not index nor control folder created under /var/mail
What do the logs show with mail_debug=yes?
Or one guess: did you explicitly specify a location inside namespace
{ .. }? "mail" and mail_location is used only if namespace location
isn't set.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
timo thanks again (and again).
but ... :(
i attach my logs with mail_debug=yes i also attach my dovecot-sql.conf and my table too.
I am reading from http://wiki.dovecot.org/UserDatabase that variable mail is overriding the default mail_location so i tried to pass all my values at mail with delimiter : for INDEX and CONTROL.
Timo Sirainen wrote:
On May 15, 2008, at 5:07 PM, Evaggelos Balaskas wrote:
there is not index nor control folder nor user folder created under /var/mail
Evaggelos Balaskas - http://ebalaskas.gr Unix System Engineer Informatics Engineer Technological Education -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFILX/PWIK+Pe9twhoRAhYcAJ0WT+7onaRO+R5jArhpzrqHUrHKkACcCxDw iiYRJQW2I9jFfSKhtUlK4us= =GsYd -----END PGP SIGNATURE-----
dovecot: May 16 15:25:59 Info: IMAP(ebal@ebalaskas.gr): Connection closed bytes=0/0
dovecot: May 16 15:26:01 Info: auth(default): new auth connection: pid=6618
dovecot: May 16 15:26:06 Info: auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=1143 rport=36937 resp=AGViYWxAZWJhbGFza2FzLmdyAHRlc3Q=
dovecot: May 16 15:26:06 Info: auth(default): client out: OK 1 user=ebal@ebalaskas.gr
dovecot: May 16 15:26:06 Info: auth-worker(default): sql(ebal@ebalaskas.gr,127.0.0.1): query: SELECT concat(userid, '@', domain) AS user, password, nets AS allow_nets FROM users WHERE userid = 'ebal' AND domain = 'ebalaskas.gr'
dovecot: May 16 15:26:06 Info: auth-worker(default): auth(ebal@ebalaskas.gr,127.0.0.1): allow_nets: Matching for network 127.0.0.1
dovecot: May 16 15:26:06 Info: auth(default): master in: REQUEST 3 6512 1
dovecot: May 16 15:26:06 Info: auth-worker(default): sql(ebal@ebalaskas.gr,127.0.0.1): SELECT concat(userid, '@', domain) AS user, home, username, uid, gid, concat( mail_type, ':', home, 'ebalaskas.gr/ebal:INDEX=', home, index
, '/ebalaskas.gr/ebal:CONTROL=', home, control , '/ebalaskas.gr/ebal' ) AS mail FROM users WHERE userid = 'ebal' AND domain = 'ebalaskas.gr'
dovecot: May 16 15:26:06 Info: auth(default): master out: USER 3 ebal@ebalaskas.gr home=/var/mail/ username=Evaggelos Balaskas uid=1108 gid=8 mail=maildir:/var/mail/ebalaskas.gr/ebal:INDEX=/var/mail/.index/ebalaskas.gr/ebal:CONTROL=/var/mail/.control/ebalaskas.gr/ebal
dovecot: May 16 15:26:06 Info: imap-login: Login: user=<ebal@ebalaskas.gr>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: May 16 15:26:06 Info: IMAP(ebal@ebalaskas.gr): Effective uid=1108, gid=8, home=/var/mail/
dovecot: May 16 15:26:06 Info: IMAP(ebal@ebalaskas.gr): maildir: data=/var/mail/ebalaskas.gr/ebal:INDEX=/var/mail/.index/ebalaskas.gr/ebal:CONTROL=/var/mail/.control/ebalaskas.gr/ebal
dovecot: May 16 15:26:06 Info: IMAP(ebal@ebalaskas.gr): maildir++: root=/var/mail/ebalaskas.gr/ebal, index=/var/mail/.index/ebalaskas.gr/ebal, control=/var/mail/.control/ebalaskas.gr/ebal, inbox=/var/mail/ebalaskas.gr/ebal
driver = mysql
connect = host=localhost dbname=dovecot user=root
password_query = SELECT concat(userid, '@', domain) AS user,
password, nets AS allow_nets FROM users WHERE userid = '%n' AND domain = '%d'
user_query = SELECT concat(userid, '@', domain) AS user, home, username, uid, gid,
concat( mail_type, ':', home, '%d/%n:INDEX=', home, index
, '/%d/%n:CONTROL=', home, control , '/%d/%n' ) AS mail
FROM users WHERE userid = '%n' AND domain = '%d'
CREATE TABLE IF NOT EXISTS users
(
userid
varchar(128) NOT NULL,
domain
varchar(128) NOT NULL,
password
varchar(64) NOT NULL,
username
varchar(100) NOT NULL,
mail_type
varchar(10) NOT NULL,
home
varchar(255) NOT NULL,
sieve
varchar(255) NOT NULL,
index
varchar(100) NOT NULL,
control
varchar(100) NOT NULL,
nets
varchar(100) NOT NULL,
uid
int(11) NOT NULL,
gid
int(11) NOT NULL,
PRIMARY KEY (userid
,domain
)
) ENGINE=MyISAM;
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
everything is perfect.
Evaggelos Balaskas wrote:
timo thanks again (and again).
but ... :(
i attach my logs with mail_debug=yes i also attach my dovecot-sql.conf and my table too.
I am reading from http://wiki.dovecot.org/UserDatabase that variable mail is overriding the default mail_location so i tried to pass all my values at mail with delimiter : for INDEX and CONTROL.
Timo Sirainen wrote:
On May 15, 2008, at 5:07 PM, Evaggelos Balaskas wrote:
there is not index nor control folder nor user folder created under /var/mail
Evaggelos Balaskas - http://ebalaskas.gr Unix System Engineer Informatics Engineer Technological Education -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFILgBTWIK+Pe9twhoRArrvAJ4+0wFK9chOQaZDzTm+f7O5NhieKACfSgLw 1vU6sXK6kuIw49l0ENV1Is0= =ecEE -----END PGP SIGNATURE-----
participants (2)
-
Evaggelos Balaskas
-
Timo Sirainen