Mercurial > dovecot > original-hg > dovecot-1.2
annotate doc/dovecot-sql-example.conf @ 8198:b50faeeefb4c HEAD
dovecot-sql-example.conf: Note that MySQL supports multiple host parameters.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 13 Sep 2008 13:28:09 +0300 |
parents | bcd70b69c7e5 |
children |
rev | line source |
---|---|
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
1 # This file is opened as root, so it should be owned by root and mode 0600. |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
2 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
3 # http://wiki.dovecot.org/AuthDatabase/SQL |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
4 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
5 # For the sql passdb module, you'll need a database with a table that |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
6 # contains fields for at least the username and password. If you want to |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
7 # use the user@domain syntax, you might want to have a separate domain |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
8 # field as well. |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
9 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
10 # If your users all have the same uig/gid, and have predictable home |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
11 # directories, you can use the static userdb module to generate the home |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
12 # dir based on the username and domain. In this case, you won't need fields |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
13 # for home, uid, or gid in the database. |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
14 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
15 # If you prefer to use the sql userdb module, you'll want to add fields |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
16 # for home, uid, and gid. Here is an example table: |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
17 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
18 # CREATE TABLE users ( |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
19 # username VARCHAR(128) NOT NULL, |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
20 # domain VARCHAR(128) NOT NULL, |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
21 # password VARCHAR(64) NOT NULL, |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
22 # home VARCHAR(255) NOT NULL, |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
23 # uid INTEGER NOT NULL, |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
24 # gid INTEGER NOT NULL, |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
25 # active CHAR(1) DEFAULT 'Y' NOT NULL |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
26 # ); |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
27 |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
28 # Database driver: mysql, pgsql, sqlite |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
29 #driver = |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
30 |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
31 # Database connection string. This is driver-specific setting. |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
32 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
33 # pgsql: |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
34 # For available options, see the PostgreSQL documention for the |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
35 # PQconnectdb function of libpq. |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
36 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
37 # mysql: |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
38 # Basic options emulate PostgreSQL option names: |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
39 # host, port, user, password, dbname |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
40 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
41 # But also adds some new settings: |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
42 # client_flags - See MySQL manual |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
43 # ssl_ca, ssl_ca_path - Set either one or both to enable SSL |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
44 # ssl_cert, ssl_key - For sending client-side certificates to server |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
45 # ssl_cipher - Set minimum allowed cipher security (default: HIGH) |
7081
ab81d6801423
Renamed default_file/group to option_file/group.
Timo Sirainen <tss@iki.fi>
parents:
7080
diff
changeset
|
46 # option_file - Read options from the given file instead of |
7080
19bd363bcf5d
Added default_file and default_group settings for MySQL.
Timo Sirainen <tss@iki.fi>
parents:
6146
diff
changeset
|
47 # the default my.cnf location |
7081
ab81d6801423
Renamed default_file/group to option_file/group.
Timo Sirainen <tss@iki.fi>
parents:
7080
diff
changeset
|
48 # option_group - Read options from the given group (default: client) |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
49 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
50 # You can connect to UNIX sockets by using host: host=/var/run/mysql.sock |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
51 # Note that currently you can't use spaces in parameters. |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
52 # |
8198
b50faeeefb4c
dovecot-sql-example.conf: Note that MySQL supports multiple host parameters.
Timo Sirainen <tss@iki.fi>
parents:
7986
diff
changeset
|
53 # MySQL supports multiple host parameters for load balancing / HA. |
b50faeeefb4c
dovecot-sql-example.conf: Note that MySQL supports multiple host parameters.
Timo Sirainen <tss@iki.fi>
parents:
7986
diff
changeset
|
54 # |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
55 # sqlite: |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
56 # The path to the database file. |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
57 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
58 # Examples: |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
59 # connect = host=192.168.1.1 dbname=users |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
60 # connect = host=sql.example.com dbname=virtual user=virtual password=blarg |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
61 # connect = /etc/dovecot/authdb.sqlite |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
62 # |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
63 #connect = |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
64 |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
65 # Default password scheme. |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
66 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
67 # List of supported schemes is in |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
68 # http://wiki.dovecot.org/Authentication/PasswordSchemes |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
69 # |
7986
bcd70b69c7e5
Changed SQL's default password scheme to MD5.
Timo Sirainen <tss@iki.fi>
parents:
7111
diff
changeset
|
70 #default_pass_scheme = MD5 |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
71 |
7111 | 72 # passdb query to retrieve the password. It can return fields: |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
73 # password - The user's password. This field must be returned. |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
74 # user - user@domain from the database. Needed with case-insensitive lookups. |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
75 # username and domain - An alternative way to represent the "user" field. |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
76 # |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
77 # The "user" field is often necessary with case-insensitive lookups to avoid |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
78 # e.g. "name" and "nAme" logins creating two different mail directories. If |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
79 # your user and domain names are in separate fields, you can return "username" |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
80 # and "domain" fields instead of "user". |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
81 # |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
82 # The query can also return other fields which have a special meaning, see |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
83 # http://wiki.dovecot.org/PasswordDatabase/ExtraFields |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
84 # |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
85 # Commonly used available substitutions (see http://wiki.dovecot.org/Variables |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
86 # for full list): |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
87 # %u = entire user@domain |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
88 # %n = user part of user@domain |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
89 # %d = domain part of user@domain |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
90 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
91 # Note that these can be used only as input to SQL query. If the query outputs |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
92 # any of these substitutions, they're not touched. Otherwise it would be |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
93 # difficult to have eg. usernames containing '%' characters. |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
94 # |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
95 # Example: |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
96 # password_query = SELECT userid AS user, pw AS password \ |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
97 # FROM users WHERE userid = '%u' AND active = 'Y' |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
98 # |
6146
bc5fdab698e3
Use \ for splitting long values to multiple lines.
Timo Sirainen <tss@iki.fi>
parents:
5384
diff
changeset
|
99 #password_query = \ |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
100 # SELECT username, domain, password \ |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
101 # FROM users WHERE username = '%n' AND domain = '%d' |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
102 |
7111 | 103 # userdb query to retrieve the user information. It can return fields: |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
104 # uid - System UID (overrides mail_uid setting) |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
105 # gid - System GID (overrides mail_gid setting) |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
106 # home - Home directory |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
107 # mail - Mail location (overrides mail_location setting) |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
108 # |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
109 # None of these are strictly required. If you use a single UID and GID, and |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
110 # home or mail directory fits to a template string, you could use userdb static |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
111 # instead. For a list of all fields that can be returned, see |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
112 # http://wiki.dovecot.org/UserDatabase/ExtraFields |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
113 # |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
114 # Examples: |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
115 # user_query = SELECT home, uid, gid FROM users WHERE userid = '%u' |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
116 # user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u' |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
117 # user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u' |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
118 # |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
119 #user_query = \ |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
120 # SELECT home, uid, gid \ |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
121 # FROM users WHERE username = '%n' AND domain = '%d' |
5384
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
122 |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
123 # If you wish to avoid two SQL lookups (passdb + userdb), you can use |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
124 # userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
125 # also have to return userdb fields in password_query prefixed with "userdb_" |
2a6ff0bbc932
Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
126 # string. For example: |
6146
bc5fdab698e3
Use \ for splitting long values to multiple lines.
Timo Sirainen <tss@iki.fi>
parents:
5384
diff
changeset
|
127 #password_query = \ |
7110
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
128 # SELECT userid AS user, password, \ |
c3365e886746
Updated comments and defaults to SQL queries. SQL is typically used with
Timo Sirainen <tss@iki.fi>
parents:
7081
diff
changeset
|
129 # home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \ |
6146
bc5fdab698e3
Use \ for splitting long values to multiple lines.
Timo Sirainen <tss@iki.fi>
parents:
5384
diff
changeset
|
130 # FROM users WHERE userid = '%u' |