Alternc  latest
Alternc logiel libre pour l'hébergement
alternc-sql.conf
Go to the documentation of this file.
1 # AUTO GENERATED FILE
2 # Modify template in /etc/alternc/templates/
3 # and launch alternc.install if you want
4 # to modify this file.
5 #
6 # This file is opened as root, so it should be owned by root and mode 0600.
7 #
8 # http://wiki2.dovecot.org/AuthDatabase/SQL
9 #
10 # For the sql passdb module, you'll need a database with a table that
11 # contains fields for at least the username and password. If you want to
12 # use the user@domain syntax, you might want to have a separate domain
13 # field as well.
14 #
15 # If your users all have the same uig/gid, and have predictable home
16 # directories, you can use the static userdb module to generate the home
17 # dir based on the username and domain. In this case, you won't need fields
18 # for home, uid, or gid in the database.
19 #
20 # If you prefer to use the sql userdb module, you'll want to add fields
21 # for home, uid, and gid. Here is an example table:
22 #
23 # CREATE TABLE users (
24 # username VARCHAR(128) NOT NULL,
25 # domain VARCHAR(128) NOT NULL,
26 # password VARCHAR(64) NOT NULL,
27 # home VARCHAR(255) NOT NULL,
28 # uid INTEGER NOT NULL,
29 # gid INTEGER NOT NULL,
30 # active CHAR(1) DEFAULT 'Y' NOT NULL
31 # );
32 
33 # Database driver: mysql, pgsql, sqlite
34 driver = mysql
35 
36 # Database connection string. This is driver-specific setting.
37 #
38 # HA / round-robin load-balancing is supported by giving multiple host
39 # settings, like: host=sql1.host.org host=sql2.host.org
40 #
41 # pgsql:
42 # For available options, see the PostgreSQL documention for the
43 # PQconnectdb function of libpq.
44 # Use maxconns=n (default 5) to change how many connections Dovecot can
45 # create to pgsql.
46 #
47 # mysql:
48 # Basic options emulate PostgreSQL option names:
49 # host, port, user, password, dbname
50 #
51 # But also adds some new settings:
52 # client_flags - See MySQL manual
53 # ssl_ca, ssl_ca_path - Set either one or both to enable SSL
54 # ssl_cert, ssl_key - For sending client-side certificates to server
55 # ssl_cipher - Set minimum allowed cipher security (default: HIGH)
56 # option_file - Read options from the given file instead of
57 # the default my.cnf location
58 # option_group - Read options from the given group (default: client)
59 #
60 # You can connect to UNIX sockets by using host: host=/run/mysql.sock
61 # Note that currently you can't use spaces in parameters.
62 #
63 # sqlite:
64 # The path to the database file.
65 #
66 # Examples:
67 # connect = host=192.168.1.1 dbname=users
68 # connect = host=sql.example.com dbname=virtual user=virtual password=blarg
69 # connect = /etc/dovecot/authdb.sqlite
70 #
71 connect = host=%%dbhost%% dbname=%%dbname%% user=%%db_mail_user%% password=%%db_mail_pwd%%
72 
73 # Default password scheme.
74 #
75 # List of supported schemes is in
76 # http://wiki2.dovecot.org/Authentication/PasswordSchemes
77 #
78 default_pass_scheme = MD5
79 
80 # passdb query to retrieve the password. It can return fields:
81 # password - The user's password. This field must be returned.
82 # user - user@domain from the database. Needed with case-insensitive lookups.
83 # username and domain - An alternative way to represent the "user" field.
84 #
85 # The "user" field is often necessary with case-insensitive lookups to avoid
86 # e.g. "name" and "nAme" logins creating two different mail directories. If
87 # your user and domain names are in separate fields, you can return "username"
88 # and "domain" fields instead of "user".
89 #
90 # The query can also return other fields which have a special meaning, see
91 # http://wiki2.dovecot.org/PasswordDatabase/ExtraFields
92 #
93 # Commonly used available substitutions (see http://wiki2.dovecot.org/Variables
94 # for full list):
95 # %u = entire user@domain
96 # %n = user part of user@domain
97 # %d = domain part of user@domain
98 #
99 # Note that these can be used only as input to SQL query. If the query outputs
100 # any of these substitutions, they're not touched. Otherwise it would be
101 # difficult to have eg. usernames containing '%' characters.
102 #
103 # Example:
104 # password_query = SELECT userid AS user, pw AS password \
105 # FROM users WHERE userid = '%u' AND active = 'Y'
106 #
107 #password_query = \
108 # SELECT username, domain, password \
109 # FROM users WHERE username = '%n' AND domain = '%d'
110 
111 # userdb query to retrieve the user information. It can return fields:
112 # uid - System UID (overrides mail_uid setting)
113 # gid - System GID (overrides mail_gid setting)
114 # home - Home directory
115 # mail - Mail location (overrides mail_location setting)
116 #
117 # None of these are strictly required. If you use a single UID and GID, and
118 # home or mail directory fits to a template string, you could use userdb static
119 # instead. For a list of all fields that can be returned, see
120 # http://wiki2.dovecot.org/UserDatabase/ExtraFields
121 #
122 # Examples:
123 # user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
124 # user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u'
125 # user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u'
126 #
127 user_query = SELECT userdb_home AS home, userdb_uid AS uid, 1998 AS gid, userdb_quota_rule AS quota_rule FROM dovecot_view WHERE user = '%u';
128 
129 # If you wish to avoid two SQL lookups (passdb + userdb), you can use
130 # userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
131 # also have to return userdb fields in password_query prefixed with "userdb_"
132 # string. For example:
133 #
134 password_query = SELECT user, password, userdb_home, userdb_uid, 1998 AS userdb_gid,userdb_quota_rule FROM dovecot_view where user= '%u';
135 
136 # Query to get a list of all usernames.
137 #iterate_query = SELECT username AS user FROM users