1##VERSION: $Id: 01c3b327e4d5b8f4123500ce4c8d0ef7a690c10d-20210515150130$ 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 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 78##NAME: MYSQL_USER_TABLE:0 79# 80# The name of the table containing your user data. See README.authmysqlrc 81# for the required fields in this table. 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# This is optional, MYSQL_SELECT_CLAUSE can be set when you have a database, 196# which is structuraly different from proposed. The fixed string will 197# be used to do a SELECT operation on database, which should return fields 198# in order specified bellow: 199# 200# username, cryptpw, clearpw, uid, gid, home, maildir, quota, fullname, options 201# 202# The username field should include the domain (see example below). 203# 204# There are two variables, which you can use. Substitution will be made 205# for them, so you can put entered username (local part) and domain name 206# in the right place of your query. These variables are: 207# $(local_part), $(domain), $(service) 208# 209# If a $(domain) is empty (not given by the remote user) the default domain 210# name is used in its place. 211# 212# $(service) will expand out to the service being authenticated: imap, imaps, 213# pop3 or pop3s. Courier mail server only: service will also expand out to 214# "courier", when searching for local mail account's location. In this case, 215# if the "maildir" field is not empty it will be used in place of 216# DEFAULTDELIVERY. Courier mail server will also use esmtp when doing 217# authenticated ESMTP. 218# 219# Either cryptpw or clearpw are required. The other one can be specified 220# as an empty string; as well as maildir, quota, and option fields. 221# 222# Example: 223# 224# MYSQL_SELECT_CLAUSE SELECT CONCAT(user,'@',domain), '', password, \ 225# uid, gid, home, '' \ 226# FROM users WHERE user='$(local_part)' \ 227# AND domain='$(domain)' 228# 229# The encrypted password field is not used, and a literal '', empty string, 230# appears in its place. Ditto for the 'maildir' field, and the remaining 231# optional fields are completely absent. The maildir field, in this example 232# can also be omitted, it's shown as an example only. 233# 234# This example is a little bit modified adaptation of vmail-sql 235# database scheme: 236# 237# MYSQL_SELECT_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name), \ 238# CONCAT('{MD5}', popbox.password_hash), \ 239# popbox.clearpw, \ 240# domain.uid, \ 241# domain.gid, \ 242# CONCAT(domain.path, '/', popbox.mbox_name), \ 243# '', \ 244# domain.quota, \ 245# '', \ 246# CONCAT("disableimap=",disableimap,",disablepop3=", \ 247# disablepop3,",disablewebmail=",disablewebmail, \ 248# ",sharedgroup=",sharedgroup) \ 249# FROM popbox, domain \ 250# WHERE popbox.local_part = '$(local_part)' \ 251# AND popbox.domain_name = '$(domain)' \ 252# AND popbox.domain_name = domain.domain_name 253 254 255##NAME: MYSQL_ENUMERATE_CLAUSE:1 256# 257# {EXPERIMENTAL} 258# Optional custom SQL query used to enumerate accounts for authenumerate, 259# in order to compile a list of accounts for shared folders. The query 260# should return the following fields: name, uid, gid, homedir, maildir, options 261# 262# Example: 263# MYSQL_ENUMERATE_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name), \ 264# domain.uid, \ 265# domain.gid, \ 266# CONCAT(domain.path, '/', popbox.mbox_name), \ 267# '', \ 268# CONCAT('sharedgroup=', sharedgroup) \ 269# FROM popbox, domain \ 270# WHERE popbox.local_part = '$(local_part)' \ 271# AND popbox.domain_name = '$(domain)' \ 272# AND popbox.domain_name = domain.domain_name 273 274 275 276##NAME: MYSQL_CHPASS_CLAUSE:0 277# 278# (EXPERIMENTAL) 279# This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a database, 280# which is structuraly different from proposed. The fixed string will 281# be used to do an UPDATE operation on database. In other words, it is 282# used, when changing password. 283# 284# There are four variables, which you can use. Substitution will be made 285# for them, so you can put entered username (local part) and domain name 286# in the right place of your query. There variables are: 287# $(local_part) , $(domain) , $(newpass) , $(newpass_crypt) 288# 289# If a $(domain) is empty (not given by the remote user) the default domain 290# name is used in its place. 291# $(newpass) contains plain password 292# $(newpass_crypt) contains its crypted form 293# 294# MYSQL_CHPASS_CLAUSE UPDATE popbox \ 295# SET clearpw='$(newpass)', \ 296# password_hash='$(newpass_crypt)' \ 297# WHERE local_part='$(local_part)' \ 298# AND domain_name='$(domain)' 299# 300 301##NAME: MARKER:0 302# 303# Do not remove this section from this configuration file. This section 304# must be present at the end of this file. 305