[Dovecot] login authentication

juan carlos juanca2711 at hotmail.com
Wed Mar 14 22:25:18 EET 2007


Hi everyone, i used postfix, dovecot and mysql. I have virtual users and 
domains. I have this configuration in dovecot-mysql.conf:
db_host = localhost
db_port = 3306
db_unix_socket = /var/run/mysqld/mysqld.sock
db = postfix
db_user = postfix
db_passwd = bscidth46
db_client_flags = 0
default_pass_scheme = CRYPT
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, 105 AS uid, 106 AS gid FROM mailbox WHERE username 
= '%u'

The table mailbox: 
+-------------------+--------------+------------------+-----------+------------+
| username          | home         | maildir          | quota     | domain     |
+-------------------+--------------+------------------+-----------+------------+
| test at domain.com   | /home/vmail/ | domain.com/test/  | 10240000 | domain.com |
| test2 at domain.com  | /home/vmail/ | domain.com/test2/ | 10240000 | domain.com |
| test3 at domain.com  | /home/vmail/ | domain.com/test3/ | 10240000 | domain.com |
+-------------------+--------------+-------------------+----------+------------+

I have this configuration in smtpd.conf:
pwcheck_method: auxprop
mech_list: LOGIN CRAM-MD5 DIGEST-MD5 GSSAPI
auxprop_plugin: sql
sql_verbose: yes
sql_engine: mysql
sql_hostnames: localhost
sql_database: postfix
sql_user: postfix
sql_passwd: bscidth46
sql_select: select password from mailbox where username = '%u@%r'

What can i do to log in with only user part of user at domain.com?
Thanks in advance



More information about the dovecot mailing list