V
V
vitaliy_saveliev2015-04-07 14:11:05
Dovecot
vitaliy_saveliev, 2015-04-07 14:11:05

How to implement authorization in Dovecot?

I have a bunch of Exim + Dovecot.
Authorization from the database is configured on the MTA with the password stored in md5.
On MDA I'm trying to set up authorization (virtual users based on the table used by Exim), which resulted in the following changes to the standard configuration file
10-auth.conf

disable_plaintext_auth = no
auth_default_realm = mydomain.ru
auth_mechanisms = plain login
!include auth-sql.conf.ext

auth-sql.conf.ext
passdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf.ext
}

userdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf.ext
}

dovecot-sql.conf.ext
connect = host=127.0.0.1 dbname=exim user=root password=passworddb
default_pass_scheme = PLAIN-MD5

password_query = SELECT username, password, CONCAT('/var/mail/', %n) as userdb_home, 104 AS userdb_uid, 106 AS userdb_gid FROM users WHERE username = '%n'
user_query = SELECT CONCAT('/var/mail/', %n) as home, 104 as uid, 106 as gid FROM users WHERE username = '%n'
iterate_query = SELECT username AS user FROM users

104/106: Debain-exim The
structure of the users table is as simple as possible: id, username varchar(32), password varchar(32)
where could be the error?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question