annotate doc/dovecot-sql-example.conf @ 6882:19baca289025 HEAD

Do fast sync if \Seen flags haven't changed, not vice versa.
author Timo Sirainen <tss@iki.fi>
date Sat, 01 Dec 2007 09:51:30 +0200
parents bc5fdab698e3
children 19bd363bcf5d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6 # contains fields for at least the userid and password. If you want to
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
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
12 # dir based on the userid and domain. In this case, you won't need fields
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 (
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
19 # userid VARCHAR(128) NOT NULL,
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
20 # 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
21 # 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
22 # 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
23 # 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
24 # 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
25 # );
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 # 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
28 #driver =
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
29
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
30 # 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
31 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
32 # pgsql:
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
33 # 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
34 # 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
35 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
36 # mysql:
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
37 # 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
38 # 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
39 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
40 # 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
41 # 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
42 # 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
43 # 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
44 # ssl_cipher - Set minimum allowed cipher security (default: HIGH)
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
45 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
46 # 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
47 # 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
48 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
49 # sqlite:
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
50 # 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
51 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
52 # Examples:
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
53 # 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
54 # 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
55 # 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
56 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
57 #connect = dbname=virtual user=virtual
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
58
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
59 # 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
60 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
61 # 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
62 # 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
63 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
64 #default_pass_scheme = PLAIN-MD5
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
65
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
66 # Query to retrieve the password.
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
67 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
68 # This query must return only one row with "user" and "password" columns.
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
69 # 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
70 # 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
71 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
72 # The "user" column is needed to make sure the username gets used with exactly
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
73 # the same casing as it's in the database. Note that if you store username and
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
74 # domain in separate fields, you most likely want to return a combination of
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
75 # them as the "user" column, otherwise the domain gets stripped.
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
76 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
77 # Commonly used available substitutions (see
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
78 # http://wiki.dovecot.org/Variables for full list):
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
79 # %u = entire userid
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
80 # %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
81 # %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
82 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
83 # 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
84 # 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
85 # 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
86 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
87 # Example:
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
88 # password_query = SELECT concat(userid, '@', domain) AS user, password FROM users WHERE userid = '%n' AND domain = '%d'
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
89 # password_query = SELECT pw AS password FROM users WHERE userid = '%u' AND active = 'Y'
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
90 #
6146
bc5fdab698e3 Use \ for splitting long values to multiple lines.
Timo Sirainen <tss@iki.fi>
parents: 5384
diff changeset
91 #password_query = \
bc5fdab698e3 Use \ for splitting long values to multiple lines.
Timo Sirainen <tss@iki.fi>
parents: 5384
diff changeset
92 # SELECT userid as user, password \
bc5fdab698e3 Use \ for splitting long values to multiple lines.
Timo Sirainen <tss@iki.fi>
parents: 5384
diff changeset
93 # 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
94
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
95 # Query to retrieve the user information.
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
96 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
97 # The query must return only one row. Commonly returned columns are:
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
98 # uid - System UID
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
99 # gid - System GID
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
100 # home - Home directory
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
101 # mail - Mail location
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
102 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
103 # Either home or mail is required. uid and gid are required. If more than one
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
104 # row is returned or there are missing fields, the login will fail. For a list
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
105 # of all fields that can be returned, see
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
106 # 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
107 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
108 # Examples
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
109 # user_query = SELECT home, uid, gid FROM users WHERE userid = '%n' AND domain = '%d'
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
110 # 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
111 # 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
112 #
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
113 #user_query = SELECT home, uid, 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
114
2a6ff0bbc932 Renamed dovecot-sql/ldap.conf to dovecot-sql/ldap-example.conf. make install
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
115 # 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
116 # 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
117 # 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
118 # string. For example:
6146
bc5fdab698e3 Use \ for splitting long values to multiple lines.
Timo Sirainen <tss@iki.fi>
parents: 5384
diff changeset
119 #password_query = \
bc5fdab698e3 Use \ for splitting long values to multiple lines.
Timo Sirainen <tss@iki.fi>
parents: 5384
diff changeset
120 # SELECT userid as user, password, \
bc5fdab698e3 Use \ for splitting long values to multiple lines.
Timo Sirainen <tss@iki.fi>
parents: 5384
diff changeset
121 # home as userdb_home, uid as userdb_uid, gid as userdb_gid \
bc5fdab698e3 Use \ for splitting long values to multiple lines.
Timo Sirainen <tss@iki.fi>
parents: 5384
diff changeset
122 # FROM users WHERE userid = '%u'