Skip to content

Commit 8d6622d

Browse files
committed
courier config
1 parent c415156 commit 8d6622d

File tree

2 files changed

+333
-0
lines changed

2 files changed

+333
-0
lines changed

config/courier/authdaemonrc

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $
2+
#
3+
# Copyright 2000-2001 Double Precision, Inc. See COPYING for
4+
# distribution information.
5+
#
6+
# authdaemonrc created from authdaemonrc.dist by sysconftool
7+
#
8+
# Do not alter lines that begin with ##, they are used when upgrading
9+
# this configuration.
10+
#
11+
# This file configures authdaemond, the resident authentication daemon.
12+
#
13+
# Comments in this file are ignored. Although this file is intended to
14+
# be sourced as a shell script, authdaemond parses it manually, so
15+
# the acceptable syntax is a bit limited. Multiline variable contents,
16+
# with the \ continuation character, are not allowed. Everything must
17+
# fit on one line. Do not use any additional whitespace for indentation,
18+
# or anything else.
19+
20+
##NAME: authmodulelist:0
21+
#
22+
# The authentication modules that are linked into authdaemond. The
23+
# default list is installed. You may selectively disable modules simply
24+
# by removing them from the following list. The available modules you
25+
# can use are: authcustom authcram authuserdb authldap authpgsql authmysql authpam
26+
27+
authmodulelist="authmysql"
28+
29+
##NAME: authmodulelistorig:1
30+
#
31+
# This setting is used by Courier's webadmin module, and should be left
32+
# alone
33+
34+
authmodulelistorig="authcustom authcram authuserdb authldap authpgsql authmysql authpam"
35+
36+
##NAME: daemons:0
37+
#
38+
# The number of daemon processes that are started. authdaemon is typically
39+
# installed where authentication modules are relatively expensive: such
40+
# as authldap, or authmysql, so it's better to have a number of them running.
41+
# PLEASE NOTE: Some platforms may experience a problem if there's more than
42+
# one daemon. Specifically, SystemV derived platforms that use TLI with
43+
# socket emulation. I'm suspicious of TLI's ability to handle multiple
44+
# processes accepting connections on the same filesystem domain socket.
45+
#
46+
# You may need to increase daemons if as your system load increases. Symptoms
47+
# include sporadic authentication failures. If you start getting
48+
# authentication failures, increase daemons. However, the default of 5
49+
# SHOULD be sufficient. Bumping up daemon count is only a short-term
50+
# solution. The permanent solution is to add more resources: RAM, faster
51+
# disks, faster CPUs...
52+
53+
daemons=5
54+
55+
##NAME: version:0
56+
#
57+
# When you have multiple versions of authdaemond.* installed, authdaemond
58+
# just picks the first one it finds. Set "version" to override that.
59+
# For example: version=authdaemond.plain
60+
61+
version=""
62+
63+
##NAME: authdaemonvar:0
64+
#
65+
# authdaemonvar is here, but is not used directly by authdaemond. It's
66+
# used by various configuration and build scripts, so don't touch it!
67+
68+
authdaemonvar=/var/run/courier/authdaemon

config/courier/authmysqlrc

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

0 commit comments

Comments
 (0)