rebuild for hcoop
[hcoop/debian/courier-authlib.git] / authmysqlrc
CommitLineData
b0322a85 1##VERSION: $Id: authmysqlrc 17 2011-04-04 02:07:37Z mrsam $
d9898ee8 2#
3# Copyright 2000-2007 Double Precision, Inc. See COPYING for
4# distribution information.
5#
6# Do not alter lines that begin with ##, they are used when upgrading
7# this configuration.
8#
9# authmysqlrc created from authmysqlrc.dist by sysconftool
10#
11# DO NOT INSTALL THIS FILE with world read permissions. This file
12# might contain the MySQL admin password!
13#
14# Each line in this file must follow the following format:
15#
16# field[spaces|tabs]value
17#
18# That is, the name of the field, followed by spaces or tabs, followed by
19# field value. Trailing spaces are prohibited.
20
21
22##NAME: LOCATION:0
23#
24# The server name, userid, and password used to log in.
25
26MYSQL_SERVER mysql.example.com
27MYSQL_USERNAME admin
28MYSQL_PASSWORD admin
29
30##NAME: SSLINFO:0
31#
32# The SSL information.
33#
34# To use SSL-encrypted connections, define the following variables (available
35# in MySQL 4.0, or higher):
36#
37#
38# MYSQL_SSL_KEY /path/to/file
39# MYSQL_SSL_CERT /path/to/file
40# MYSQL_SSL_CACERT /path/to/file
41# MYSQL_SSL_CAPATH /path/to/file
42# MYSQL_SSL_CIPHERS ALL:!DES
43
44##NAME: MYSQL_SOCKET:0
45#
46# MYSQL_SOCKET can be used with MySQL version 3.22 or later, it specifies the
47# filesystem pipe used for the connection
48#
49# MYSQL_SOCKET /var/mysql/mysql.sock
50
51##NAME: MYSQL_PORT:0
52#
53# MYSQL_PORT can be used with MySQL version 3.22 or later to specify a port to
54# connect to.
55
56MYSQL_PORT 0
57
58##NAME: MYSQL_OPT:0
59#
60# Leave MYSQL_OPT as 0, unless you know what you're doing.
61
62MYSQL_OPT 0
63
64##NAME: MYSQL_DATABASE:0
65#
66# The name of the MySQL database we will open:
67
68MYSQL_DATABASE mysql
69
dd184caf 70#NAME: MYSQL_CHARACTER_SET:0
71#
72# This is optional. MYSQL_CHARACTER_SET installs a character set. This option
73# can be used with MySQL version 4.1 or later. MySQL supports 70+ collations
74# for 30+ character sets. See MySQL documentations for more detalis.
75#
76# MYSQL_CHARACTER_SET latin1
77
d9898ee8 78##NAME: MYSQL_USER_TABLE:0
79#
80# The name of the table containing your user data. See README.authmysqlrc
dd184caf 81# for the required fields in this table.
d9898ee8 82
83MYSQL_USER_TABLE passwd
84
85##NAME: MYSQL_CRYPT_PWFIELD:0
86#
87# Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined. Both
88# are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext
89# passwords go into MYSQL_CLEAR_PWFIELD. Cleartext passwords allow
90# CRAM-MD5 authentication to be implemented.
91
92MYSQL_CRYPT_PWFIELD crypt
93
94##NAME: MYSQL_CLEAR_PWFIELD:0
95#
96#
97# MYSQL_CLEAR_PWFIELD clear
98
99##NAME: MYSQL_DEFAULT_DOMAIN:0
100#
101# If DEFAULT_DOMAIN is defined, and someone tries to log in as 'user',
102# we will look up 'user@DEFAULT_DOMAIN' instead.
103#
104#
105# DEFAULT_DOMAIN example.com
106
107##NAME: MYSQL_UID_FIELD:0
108#
109# Other fields in the mysql table:
110#
111# MYSQL_UID_FIELD - contains the numerical userid of the account
112#
113MYSQL_UID_FIELD uid
114
115##NAME: MYSQL_GID_FIELD:0
116#
117# Numerical groupid of the account
118
119MYSQL_GID_FIELD gid
120
121##NAME: MYSQL_LOGIN_FIELD:0
122#
123# The login id, default is id. Basically the query is:
124#
125# SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE id='loginid'
126#
127
128MYSQL_LOGIN_FIELD id
129
130##NAME: MYSQL_HOME_FIELD:0
131#
132
133MYSQL_HOME_FIELD home
134
135##NAME: MYSQL_NAME_FIELD:0
136#
137# The user's name (optional)
138
139MYSQL_NAME_FIELD name
140
141##NAME: MYSQL_MAILDIR_FIELD:0
142#
143# This is an optional field, and can be used to specify an arbitrary
144# location of the maildir for the account, which normally defaults to
145# $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).
146#
147# You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this
148# out.
149#
150# MYSQL_MAILDIR_FIELD maildir
151
152##NAME: MYSQL_DEFAULTDELIVERY:0
153#
154# Courier mail server only: optional field specifies custom mail delivery
155# instructions for this account (if defined) -- essentially overrides
156# DEFAULTDELIVERY from ${sysconfdir}/courierd
157#
158# MYSQL_DEFAULTDELIVERY defaultdelivery
159
160##NAME: MYSQL_QUOTA_FIELD:0
161#
162# Define MYSQL_QUOTA_FIELD to be the name of the field that can optionally
163# specify a maildir quota. See README.maildirquota for more information
164#
165# MYSQL_QUOTA_FIELD quota
166
167##NAME: MYSQL_AUXOPTIONS:0
168#
169# Auxiliary options. The MYSQL_AUXOPTIONS field should be a char field that
170# contains a single string consisting of comma-separated "ATTRIBUTE=NAME"
171# pairs. These names are additional attributes that define various per-account
172# "options", as given in INSTALL's description of the "Account OPTIONS"
173# setting.
174#
175# MYSQL_AUXOPTIONS_FIELD auxoptions
176#
177# You might want to try something like this, if you'd like to use a bunch
178# of individual fields, instead of a single text blob:
179#
180# MYSQL_AUXOPTIONS_FIELD CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablewebmail=",disablewebmail,",sharedgroup=",sharedgroup)
181#
182# This will let you define fields called "disableimap", etc, with the end result
183# being something that the OPTIONS parser understands.
184
185
186##NAME: MYSQL_WHERE_CLAUSE:0
187#
188# This is optional, MYSQL_WHERE_CLAUSE can be basically set to an arbitrary
189# fixed string that is appended to the WHERE clause of our query
190#
191# MYSQL_WHERE_CLAUSE server='mailhost.example.com'
192
193##NAME: MYSQL_SELECT_CLAUSE:0
194#
195# (EXPERIMENTAL)
196# This is optional, MYSQL_SELECT_CLAUSE can be set when you have a database,
197# which is structuraly different from proposed. The fixed string will
198# be used to do a SELECT operation on database, which should return fields
199# in order specified bellow:
200#
201# username, cryptpw, clearpw, uid, gid, home, maildir, quota, fullname, options
202#
203# The username field should include the domain (see example below).
204#
205# Enabling this option causes ignorance of any other field-related
206# options, excluding default domain.
207#
208# There are two variables, which you can use. Substitution will be made
209# for them, so you can put entered username (local part) and domain name
210# in the right place of your query. These variables are:
211# $(local_part), $(domain), $(service)
212#
213# If a $(domain) is empty (not given by the remote user) the default domain
214# name is used in its place.
215#
216# $(service) will expand out to the service being authenticated: imap, imaps,
217# pop3 or pop3s. Courier mail server only: service will also expand out to
218# "courier", when searching for local mail account's location. In this case,
219# if the "maildir" field is not empty it will be used in place of
220# DEFAULTDELIVERY. Courier mail server will also use esmtp when doing
221# authenticated ESMTP.
222#
223# This example is a little bit modified adaptation of vmail-sql
224# database scheme:
225#
226# MYSQL_SELECT_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name), \
227# CONCAT('{MD5}', popbox.password_hash), \
228# popbox.clearpw, \
229# domain.uid, \
230# domain.gid, \
231# CONCAT(domain.path, '/', popbox.mbox_name), \
232# '', \
233# domain.quota, \
234# '', \
235# CONCAT("disableimap=",disableimap,",disablepop3=", \
236# disablepop3,",disablewebmail=",disablewebmail, \
237# ",sharedgroup=",sharedgroup) \
238# FROM popbox, domain \
239# WHERE popbox.local_part = '$(local_part)' \
240# AND popbox.domain_name = '$(domain)' \
241# AND popbox.domain_name = domain.domain_name
242
243
244##NAME: MYSQL_ENUMERATE_CLAUSE:1
245#
246# {EXPERIMENTAL}
247# Optional custom SQL query used to enumerate accounts for authenumerate,
248# in order to compile a list of accounts for shared folders. The query
249# should return the following fields: name, uid, gid, homedir, maildir, options
250#
251# Example:
252# MYSQL_ENUMERATE_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name), \
253# domain.uid, \
254# domain.gid, \
255# CONCAT(domain.path, '/', popbox.mbox_name), \
256# '', \
257# CONCAT('sharedgroup=', sharedgroup) \
258# FROM popbox, domain \
259# WHERE popbox.local_part = '$(local_part)' \
260# AND popbox.domain_name = '$(domain)' \
261# AND popbox.domain_name = domain.domain_name
262
263
264
265##NAME: MYSQL_CHPASS_CLAUSE:0
266#
267# (EXPERIMENTAL)
268# This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a database,
269# which is structuraly different from proposed. The fixed string will
270# be used to do an UPDATE operation on database. In other words, it is
271# used, when changing password.
272#
273# There are four variables, which you can use. Substitution will be made
274# for them, so you can put entered username (local part) and domain name
275# in the right place of your query. There variables are:
276# $(local_part) , $(domain) , $(newpass) , $(newpass_crypt)
277#
278# If a $(domain) is empty (not given by the remote user) the default domain
279# name is used in its place.
280# $(newpass) contains plain password
281# $(newpass_crypt) contains its crypted form
282#
283# MYSQL_CHPASS_CLAUSE UPDATE popbox \
284# SET clearpw='$(newpass)', \
285# password_hash='$(newpass_crypt)' \
286# WHERE local_part='$(local_part)' \
287# AND domain_name='$(domain)'
288#