|
| 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