1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| # http://wiki.dovecot.org/AuthDatabase/SQL
| #
| # CREATE TABLE users (
| # userid VARCHAR(128) NOT NULL,
| # password VARCHAR(64) NOT NULL,
| # home VARCHAR(255) NOT NULL,
| # uid INTEGER NOT NULL,
| # gid INTEGER NOT NULL,
| # active CHAR(1) DEFAULT 'Y' NOT NULL
| # );
|
| driver = mysql
| connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} port={mysql_server_port}
| default_pass_scheme = CRYPT
|
| # password-query with prefetch
| password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
| user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}'
|
| # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
| # Do not enable it on Dovecot 1.x servers
| # iterate_query = SELECT email as user FROM mail_user WHERE server_id = '{server_id}'
|
|