Mercurial > dovecot > core-2.2
changeset 10260:32d007b5f41d HEAD
example-config: Added ".ext" extension for ldap/sql/dict-sql/db config files.
This separates them from the rest of the config files that can be directly
included from conf.d/.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 05 Nov 2009 18:39:36 -0500 |
parents | e0db66c8b9a9 |
children | 16d40abb75b8 |
files | doc/example-config/conf.d/auth.conf doc/example-config/dovecot-db.conf doc/example-config/dovecot-db.conf.ext doc/example-config/dovecot-dict-sql.conf doc/example-config/dovecot-dict-sql.conf.ext doc/example-config/dovecot-ldap.conf doc/example-config/dovecot-ldap.conf.ext doc/example-config/dovecot-sql.conf doc/example-config/dovecot-sql.conf.ext doc/example-config/dovecot.conf doc/example-config/dovecot.conf.ext |
diffstat | 11 files changed, 403 insertions(+), 403 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/example-config/conf.d/auth.conf Thu Nov 05 18:01:06 2009 -0500 +++ b/doc/example-config/conf.d/auth.conf Thu Nov 05 18:39:36 2009 -0500 @@ -201,13 +201,13 @@ # SQL database <doc/wiki/AuthDatabase.SQL.txt> #passdb sql { - # Path for SQL configuration file, see doc/dovecot-sql-example.conf + # Path for SQL configuration file, see example-config/dovecot-sql.conf.ext #args = #} # LDAP database <doc/wiki/AuthDatabase.LDAP.txt> #passdb ldap { - # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf + # Path for LDAP configuration file, see example-config/dovecot-ldap.conf.ext #args = #} @@ -283,13 +283,13 @@ # SQL database <doc/wiki/AuthDatabase.SQL.txt> #userdb sql { - # Path for SQL configuration file, see doc/dovecot-sql-example.conf + # Path for SQL configuration file, see example-config/dovecot-sql.conf.ext #args = #} # LDAP database <doc/wiki/AuthDatabase.LDAP.txt> #userdb ldap { - # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf + # Path for LDAP configuration file, see example-config/dovecot-ldap.conf.ext #args = #}
--- a/doc/example-config/dovecot-db.conf Thu Nov 05 18:01:06 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -# Example DB_CONFIG for Berkeley DB. Typically dict_db_config setting is used -# to point to this file. -# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/env/db_config.html - -# Maximum number of simultaneous transactions. -set_tx_max 1000 - -# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/lock/max.html -#set_lk_max_locks 1000 -#set_lk_max_lockers 1000 -#set_lk_max_objects 1000
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/example-config/dovecot-db.conf.ext Thu Nov 05 18:39:36 2009 -0500 @@ -0,0 +1,11 @@ +# Example DB_CONFIG for Berkeley DB. Typically dict_db_config setting is used +# to point to this file. +# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/env/db_config.html + +# Maximum number of simultaneous transactions. +set_tx_max 1000 + +# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/lock/max.html +#set_lk_max_locks 1000 +#set_lk_max_lockers 1000 +#set_lk_max_objects 1000
--- a/doc/example-config/dovecot-dict-sql.conf Thu Nov 05 18:01:06 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -#connect = host=localhost dbname=mails user=testuser password=pass - -# CREATE TABLE quota ( -# username varchar(100) not null, -# bytes bigint not null default 0, -# messages integer not null default 0, -# primary key (username) -# ); - -map { - pattern = priv/quota/storage - table = quota - username_field = username - value_field = bytes -} -map { - pattern = priv/quota/messages - table = quota - username_field = username - value_field = messages -} - -# CREATE TABLE expires ( -# username varchar(100) not null, -# mailbox varchar(255) not null, -# expire_stamp integer not null, -# primary key (username, mailbox) -# ); - -map { - pattern = shared/expire/$user/$mailbox - table = expires - value_field = expire_stamp - - fields { - username = $user - mailbox = $mailbox - } -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/example-config/dovecot-dict-sql.conf.ext Thu Nov 05 18:39:36 2009 -0500 @@ -0,0 +1,39 @@ +#connect = host=localhost dbname=mails user=testuser password=pass + +# CREATE TABLE quota ( +# username varchar(100) not null, +# bytes bigint not null default 0, +# messages integer not null default 0, +# primary key (username) +# ); + +map { + pattern = priv/quota/storage + table = quota + username_field = username + value_field = bytes +} +map { + pattern = priv/quota/messages + table = quota + username_field = username + value_field = messages +} + +# CREATE TABLE expires ( +# username varchar(100) not null, +# mailbox varchar(255) not null, +# expire_stamp integer not null, +# primary key (username, mailbox) +# ); + +map { + pattern = shared/expire/$user/$mailbox + table = expires + value_field = expire_stamp + + fields { + username = $user + mailbox = $mailbox + } +}
--- a/doc/example-config/dovecot-ldap.conf Thu Nov 05 18:01:06 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -# This file is opened as root, so it should be owned by root and mode 0600. -# -# http://wiki.dovecot.org/AuthDatabase/LDAP -# -# NOTE: If you're not using authentication binds, you'll need to give -# dovecot-auth read access to userPassword field in the LDAP server. -# With OpenLDAP this is done by modifying /etc/ldap/slapd.conf. There should -# already be something like this: - -# access to attribute=userPassword -# by dn="<dovecot's dn>" read # add this -# by anonymous auth -# by self write -# by * none - -# Space separated list of LDAP hosts to use. host:port is allowed too. -#hosts = - -# LDAP URIs to use. You can use this instead of hosts list. Note that this -# setting isn't supported by all LDAP libraries. -#uris = - -# Distinguished Name - the username used to login to the LDAP server. -# Leave it commented out to bind anonymously (useful with auth_bind=yes). -#dn = - -# Password for LDAP server, if dn is specified. -#dnpass = - -# Use SASL binding instead of the simple binding. Note that this changes -# ldap_version automatically to be 3 if it's lower. Also note that SASL binds -# and auth_bind=yes don't work together. -#sasl_bind = no -# SASL mechanism name to use. -#sasl_mech = -# SASL realm to use. -#sasl_realm = -# SASL authorization ID, ie. the dnpass is for this "master user", but the -# dn is still the logged in user. Normally you want to keep this empty. -#sasl_authz_id = - -# Use TLS to connect to the LDAP server. -#tls = no -# TLS options, currently supported only with OpenLDAP: -#tls_ca_cert_file = -#tls_ca_cert_dir = -#tls_cert_file = -#tls_key_file = -#tls_cipher_suite = -# Valid values: never, hard, demand, allow, try -#tls_require_cert = - -# Use the given ldaprc path. -#ldaprc_path = - -# LDAP library debug level as specified by LDAP_DEBUG_* in ldap_log.h. -# -1 = everything. You may need to recompile OpenLDAP with debugging enabled -# to get enough output. -#debug_level = 0 - -# Use authentication binding for verifying password's validity. This works by -# logging into LDAP server using the username and password given by client. -# The pass_filter is used to find the DN for the user. Note that the pass_attrs -# is still used, only the password field is ignored in it. Before doing any -# search, the binding is switched back to the default DN. -#auth_bind = no - -# If authentication binding is used, you can save one LDAP request per login -# if users' DN can be specified with a common template. The template can use -# the standard %variables (see user_filter). Note that you can't -# use any pass_attrs if you use this setting. -# -# If you use this setting, it's a good idea to use a different -# dovecot-ldap.conf for userdb (it can even be a symlink, just as long as the -# filename is different in userdb's args). That way one connection is used only -# for LDAP binds and another connection is used for user lookups. Otherwise -# the binding is changed to the default DN before each user lookup. -# -# For example: -# auth_bind_userdn = cn=%u,ou=people,o=org -# -#auth_bind_userdn = - -# LDAP protocol version to use. Likely 2 or 3. -#ldap_version = 3 - -# LDAP base. %variables can be used here. -# For example: dc=mail, dc=example, dc=org -base = - -# Dereference: never, searching, finding, always -#deref = never - -# Search scope: base, onelevel, subtree -#scope = subtree - -# User attributes are given in LDAP-name=dovecot-internal-name list. The -# internal names are: -# uid - System UID -# gid - System GID -# home - Home directory -# mail - Mail location -# -# There are also other special fields which can be returned, see -# http://wiki.dovecot.org/UserDatabase/ExtraFields -#user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid - -# Filter for user lookup. Some variables can be used (see -# http://wiki.dovecot.org/Variables for full list): -# %u - username -# %n - user part in user@domain, same as %u if there's no domain -# %d - domain part in user@domain, empty if user there's no domain -#user_filter = (&(objectClass=posixAccount)(uid=%u)) - -# Password checking attributes: -# user: Virtual user name (user@domain), if you wish to change the -# user-given username to something else -# password: Password, may optionally start with {type}, eg. {crypt} -# There are also other special fields which can be returned, see -# http://wiki.dovecot.org/PasswordDatabase/ExtraFields -#pass_attrs = uid=user,userPassword=password - -# If you wish to avoid two LDAP lookups (passdb + userdb), you can use -# userdb prefetch instead of userdb ldap in dovecot.conf. In that case you'll -# also have to include user_attrs in pass_attrs field prefixed with "userdb_" -# string. For example: -#pass_attrs = uid=user,userPassword=password,\ -# homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid - -# Filter for password lookups -#pass_filter = (&(objectClass=posixAccount)(uid=%u)) - -# Attributes and filter to get a list of all users -#iterate_attrs = uid=user -#iterate_filter = (objectClass=posixAccount) - -# Default password scheme. "{scheme}" before password overrides this. -# List of supported schemes is in: http://wiki.dovecot.org/Authentication -#default_pass_scheme = CRYPT
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/example-config/dovecot-ldap.conf.ext Thu Nov 05 18:39:36 2009 -0500 @@ -0,0 +1,139 @@ +# This file is opened as root, so it should be owned by root and mode 0600. +# +# http://wiki.dovecot.org/AuthDatabase/LDAP +# +# NOTE: If you're not using authentication binds, you'll need to give +# dovecot-auth read access to userPassword field in the LDAP server. +# With OpenLDAP this is done by modifying /etc/ldap/slapd.conf. There should +# already be something like this: + +# access to attribute=userPassword +# by dn="<dovecot's dn>" read # add this +# by anonymous auth +# by self write +# by * none + +# Space separated list of LDAP hosts to use. host:port is allowed too. +#hosts = + +# LDAP URIs to use. You can use this instead of hosts list. Note that this +# setting isn't supported by all LDAP libraries. +#uris = + +# Distinguished Name - the username used to login to the LDAP server. +# Leave it commented out to bind anonymously (useful with auth_bind=yes). +#dn = + +# Password for LDAP server, if dn is specified. +#dnpass = + +# Use SASL binding instead of the simple binding. Note that this changes +# ldap_version automatically to be 3 if it's lower. Also note that SASL binds +# and auth_bind=yes don't work together. +#sasl_bind = no +# SASL mechanism name to use. +#sasl_mech = +# SASL realm to use. +#sasl_realm = +# SASL authorization ID, ie. the dnpass is for this "master user", but the +# dn is still the logged in user. Normally you want to keep this empty. +#sasl_authz_id = + +# Use TLS to connect to the LDAP server. +#tls = no +# TLS options, currently supported only with OpenLDAP: +#tls_ca_cert_file = +#tls_ca_cert_dir = +#tls_cert_file = +#tls_key_file = +#tls_cipher_suite = +# Valid values: never, hard, demand, allow, try +#tls_require_cert = + +# Use the given ldaprc path. +#ldaprc_path = + +# LDAP library debug level as specified by LDAP_DEBUG_* in ldap_log.h. +# -1 = everything. You may need to recompile OpenLDAP with debugging enabled +# to get enough output. +#debug_level = 0 + +# Use authentication binding for verifying password's validity. This works by +# logging into LDAP server using the username and password given by client. +# The pass_filter is used to find the DN for the user. Note that the pass_attrs +# is still used, only the password field is ignored in it. Before doing any +# search, the binding is switched back to the default DN. +#auth_bind = no + +# If authentication binding is used, you can save one LDAP request per login +# if users' DN can be specified with a common template. The template can use +# the standard %variables (see user_filter). Note that you can't +# use any pass_attrs if you use this setting. +# +# If you use this setting, it's a good idea to use a different +# dovecot-ldap.conf.ext for userdb (it can even be a symlink, just as long as +# the filename is different in userdb's args). That way one connection is used +# only for LDAP binds and another connection is used for user lookups. +# Otherwise the binding is changed to the default DN before each user lookup. +# +# For example: +# auth_bind_userdn = cn=%u,ou=people,o=org +# +#auth_bind_userdn = + +# LDAP protocol version to use. Likely 2 or 3. +#ldap_version = 3 + +# LDAP base. %variables can be used here. +# For example: dc=mail, dc=example, dc=org +base = + +# Dereference: never, searching, finding, always +#deref = never + +# Search scope: base, onelevel, subtree +#scope = subtree + +# User attributes are given in LDAP-name=dovecot-internal-name list. The +# internal names are: +# uid - System UID +# gid - System GID +# home - Home directory +# mail - Mail location +# +# There are also other special fields which can be returned, see +# http://wiki.dovecot.org/UserDatabase/ExtraFields +#user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid + +# Filter for user lookup. Some variables can be used (see +# http://wiki.dovecot.org/Variables for full list): +# %u - username +# %n - user part in user@domain, same as %u if there's no domain +# %d - domain part in user@domain, empty if user there's no domain +#user_filter = (&(objectClass=posixAccount)(uid=%u)) + +# Password checking attributes: +# user: Virtual user name (user@domain), if you wish to change the +# user-given username to something else +# password: Password, may optionally start with {type}, eg. {crypt} +# There are also other special fields which can be returned, see +# http://wiki.dovecot.org/PasswordDatabase/ExtraFields +#pass_attrs = uid=user,userPassword=password + +# If you wish to avoid two LDAP lookups (passdb + userdb), you can use +# userdb prefetch instead of userdb ldap in dovecot.conf. In that case you'll +# also have to include user_attrs in pass_attrs field prefixed with "userdb_" +# string. For example: +#pass_attrs = uid=user,userPassword=password,\ +# homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid + +# Filter for password lookups +#pass_filter = (&(objectClass=posixAccount)(uid=%u)) + +# Attributes and filter to get a list of all users +#iterate_attrs = uid=user +#iterate_filter = (objectClass=posixAccount) + +# Default password scheme. "{scheme}" before password overrides this. +# List of supported schemes is in: http://wiki.dovecot.org/Authentication +#default_pass_scheme = CRYPT
--- a/doc/example-config/dovecot-sql.conf Thu Nov 05 18:01:06 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -# This file is opened as root, so it should be owned by root and mode 0600. -# -# http://wiki.dovecot.org/AuthDatabase/SQL -# -# For the sql passdb module, you'll need a database with a table that -# contains fields for at least the username and password. If you want to -# use the user@domain syntax, you might want to have a separate domain -# field as well. -# -# If your users all have the same uig/gid, and have predictable home -# directories, you can use the static userdb module to generate the home -# dir based on the username and domain. In this case, you won't need fields -# for home, uid, or gid in the database. -# -# If you prefer to use the sql userdb module, you'll want to add fields -# for home, uid, and gid. Here is an example table: -# -# CREATE TABLE users ( -# username VARCHAR(128) NOT NULL, -# domain VARCHAR(128) NOT NULL, -# password VARCHAR(64) NOT NULL, -# home VARCHAR(255) NOT NULL, -# uid INTEGER NOT NULL, -# gid INTEGER NOT NULL, -# active CHAR(1) DEFAULT 'Y' NOT NULL -# ); - -# Database driver: mysql, pgsql, sqlite -#driver = - -# Database connection string. This is driver-specific setting. -# -# pgsql: -# For available options, see the PostgreSQL documention for the -# PQconnectdb function of libpq. -# -# mysql: -# Basic options emulate PostgreSQL option names: -# host, port, user, password, dbname -# -# But also adds some new settings: -# client_flags - See MySQL manual -# ssl_ca, ssl_ca_path - Set either one or both to enable SSL -# ssl_cert, ssl_key - For sending client-side certificates to server -# ssl_cipher - Set minimum allowed cipher security (default: HIGH) -# option_file - Read options from the given file instead of -# the default my.cnf location -# option_group - Read options from the given group (default: client) -# -# You can connect to UNIX sockets by using host: host=/var/run/mysql.sock -# Note that currently you can't use spaces in parameters. -# -# MySQL supports multiple host parameters for load balancing / HA. -# -# sqlite: -# The path to the database file. -# -# Examples: -# connect = host=192.168.1.1 dbname=users -# connect = host=sql.example.com dbname=virtual user=virtual password=blarg -# connect = /etc/dovecot/authdb.sqlite -# -#connect = - -# Default password scheme. -# -# List of supported schemes is in -# http://wiki.dovecot.org/Authentication/PasswordSchemes -# -#default_pass_scheme = MD5 - -# passdb query to retrieve the password. It can return fields: -# password - The user's password. This field must be returned. -# user - user@domain from the database. Needed with case-insensitive lookups. -# username and domain - An alternative way to represent the "user" field. -# -# The "user" field is often necessary with case-insensitive lookups to avoid -# e.g. "name" and "nAme" logins creating two different mail directories. If -# your user and domain names are in separate fields, you can return "username" -# and "domain" fields instead of "user". -# -# The query can also return other fields which have a special meaning, see -# http://wiki.dovecot.org/PasswordDatabase/ExtraFields -# -# Commonly used available substitutions (see http://wiki.dovecot.org/Variables -# for full list): -# %u = entire user@domain -# %n = user part of user@domain -# %d = domain part of user@domain -# -# Note that these can be used only as input to SQL query. If the query outputs -# any of these substitutions, they're not touched. Otherwise it would be -# difficult to have eg. usernames containing '%' characters. -# -# Example: -# password_query = SELECT userid AS user, pw AS password \ -# FROM users WHERE userid = '%u' AND active = 'Y' -# -#password_query = \ -# SELECT username, domain, password \ -# FROM users WHERE username = '%n' AND domain = '%d' - -# userdb query to retrieve the user information. It can return fields: -# uid - System UID (overrides mail_uid setting) -# gid - System GID (overrides mail_gid setting) -# home - Home directory -# mail - Mail location (overrides mail_location setting) -# -# None of these are strictly required. If you use a single UID and GID, and -# home or mail directory fits to a template string, you could use userdb static -# instead. For a list of all fields that can be returned, see -# http://wiki.dovecot.org/UserDatabase/ExtraFields -# -# Examples: -# user_query = SELECT home, uid, gid FROM users WHERE userid = '%u' -# user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u' -# user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u' -# -#user_query = \ -# SELECT home, uid, gid \ -# FROM users WHERE username = '%n' AND domain = '%d' - -# If you wish to avoid two SQL lookups (passdb + userdb), you can use -# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll -# also have to return userdb fields in password_query prefixed with "userdb_" -# string. For example: -#password_query = \ -# SELECT userid AS user, password, \ -# home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \ -# FROM users WHERE userid = '%u' - -# Query to get a list of all usernames. -#iterate_query = SELECT username AS user FROM users
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/example-config/dovecot-sql.conf.ext Thu Nov 05 18:39:36 2009 -0500 @@ -0,0 +1,133 @@ +# This file is opened as root, so it should be owned by root and mode 0600. +# +# http://wiki.dovecot.org/AuthDatabase/SQL +# +# For the sql passdb module, you'll need a database with a table that +# contains fields for at least the username and password. If you want to +# use the user@domain syntax, you might want to have a separate domain +# field as well. +# +# If your users all have the same uig/gid, and have predictable home +# directories, you can use the static userdb module to generate the home +# dir based on the username and domain. In this case, you won't need fields +# for home, uid, or gid in the database. +# +# If you prefer to use the sql userdb module, you'll want to add fields +# for home, uid, and gid. Here is an example table: +# +# CREATE TABLE users ( +# username VARCHAR(128) NOT NULL, +# domain VARCHAR(128) NOT NULL, +# password VARCHAR(64) NOT NULL, +# home VARCHAR(255) NOT NULL, +# uid INTEGER NOT NULL, +# gid INTEGER NOT NULL, +# active CHAR(1) DEFAULT 'Y' NOT NULL +# ); + +# Database driver: mysql, pgsql, sqlite +#driver = + +# Database connection string. This is driver-specific setting. +# +# pgsql: +# For available options, see the PostgreSQL documention for the +# PQconnectdb function of libpq. +# +# mysql: +# Basic options emulate PostgreSQL option names: +# host, port, user, password, dbname +# +# But also adds some new settings: +# client_flags - See MySQL manual +# ssl_ca, ssl_ca_path - Set either one or both to enable SSL +# ssl_cert, ssl_key - For sending client-side certificates to server +# ssl_cipher - Set minimum allowed cipher security (default: HIGH) +# option_file - Read options from the given file instead of +# the default my.cnf location +# option_group - Read options from the given group (default: client) +# +# You can connect to UNIX sockets by using host: host=/var/run/mysql.sock +# Note that currently you can't use spaces in parameters. +# +# MySQL supports multiple host parameters for load balancing / HA. +# +# sqlite: +# The path to the database file. +# +# Examples: +# connect = host=192.168.1.1 dbname=users +# connect = host=sql.example.com dbname=virtual user=virtual password=blarg +# connect = /etc/dovecot/authdb.sqlite +# +#connect = + +# Default password scheme. +# +# List of supported schemes is in +# http://wiki.dovecot.org/Authentication/PasswordSchemes +# +#default_pass_scheme = MD5 + +# passdb query to retrieve the password. It can return fields: +# password - The user's password. This field must be returned. +# user - user@domain from the database. Needed with case-insensitive lookups. +# username and domain - An alternative way to represent the "user" field. +# +# The "user" field is often necessary with case-insensitive lookups to avoid +# e.g. "name" and "nAme" logins creating two different mail directories. If +# your user and domain names are in separate fields, you can return "username" +# and "domain" fields instead of "user". +# +# The query can also return other fields which have a special meaning, see +# http://wiki.dovecot.org/PasswordDatabase/ExtraFields +# +# Commonly used available substitutions (see http://wiki.dovecot.org/Variables +# for full list): +# %u = entire user@domain +# %n = user part of user@domain +# %d = domain part of user@domain +# +# Note that these can be used only as input to SQL query. If the query outputs +# any of these substitutions, they're not touched. Otherwise it would be +# difficult to have eg. usernames containing '%' characters. +# +# Example: +# password_query = SELECT userid AS user, pw AS password \ +# FROM users WHERE userid = '%u' AND active = 'Y' +# +#password_query = \ +# SELECT username, domain, password \ +# FROM users WHERE username = '%n' AND domain = '%d' + +# userdb query to retrieve the user information. It can return fields: +# uid - System UID (overrides mail_uid setting) +# gid - System GID (overrides mail_gid setting) +# home - Home directory +# mail - Mail location (overrides mail_location setting) +# +# None of these are strictly required. If you use a single UID and GID, and +# home or mail directory fits to a template string, you could use userdb static +# instead. For a list of all fields that can be returned, see +# http://wiki.dovecot.org/UserDatabase/ExtraFields +# +# Examples: +# user_query = SELECT home, uid, gid FROM users WHERE userid = '%u' +# user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u' +# user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u' +# +#user_query = \ +# SELECT home, uid, gid \ +# FROM users WHERE username = '%n' AND domain = '%d' + +# If you wish to avoid two SQL lookups (passdb + userdb), you can use +# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll +# also have to return userdb fields in password_query prefixed with "userdb_" +# string. For example: +#password_query = \ +# SELECT userid AS user, password, \ +# home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \ +# FROM users WHERE userid = '%u' + +# Query to get a list of all usernames. +#iterate_query = SELECT username AS user FROM users
--- a/doc/example-config/dovecot.conf Thu Nov 05 18:01:06 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -## Dovecot configuration file - -# If you're in a hurry, see http://wiki.dovecot.org/QuickConfiguration - -# "dovecot -n" command gives a clean output of the changed settings. Use it -# instead of copy&pasting files when posting to the Dovecot mailing list. - -# '#' character and everything after it is treated as comments. Extra spaces -# and tabs are ignored. If you want to use either of these explicitly, put the -# value inside quotes, eg.: key = "# char and trailing whitespace " - -# Default values are shown for each setting, it's not required to uncomment -# those. These are exceptions to this though: No sections (e.g. namespace {}) -# or plugin settings are added by default, they're listed only as examples. -# Paths are also just examples with the real defaults being based on configure -# options. The paths listed here are for configure --prefix=/usr -# --sysconfdir=/etc --localstatedir=/var - -# Most of the actual configuration gets included here: -!include conf.d/*.conf - -# Protocols we want to be serving. -#protocols = imap pop3 lmtp - -# A comma separated list of IPs or hosts where to listen in for connections. -# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces. -# If you want to specify non-default ports or anything more complex, -# edit conf.d/master.conf. -#listen = *, :: - -# Disable LOGIN command and all other plaintext authentications unless -# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP -# matches the local IP (ie. you're connecting from the same computer), the -# connection is considered secure and plaintext authentication is allowed. -#disable_plaintext_auth = yes - -# Base directory where to store runtime data. -#base_dir = /var/run/dovecot/ - -# Greeting message for clients. -#login_greeting = Dovecot ready. - -# Space separated list of trusted network ranges. Connections from these -# IPs are allowed to override their IP addresses and ports (for logging and -# for authentication checks). disable_plaintext_auth is also ignored for -# these networks. Typically you'd specify your IMAP proxy servers here. -#login_trusted_networks = - -# Show more verbose process titles (in ps). Currently shows user name and -# IP address. Useful for seeing who are actually using the IMAP processes -# (eg. shared mailboxes or if same uid is used for multiple accounts). -#verbose_proctitle = no - -# Should all processes be killed when Dovecot master process shuts down. -# Setting this to "no" means that Dovecot can be upgraded without -# forcing existing client connections to close (although that could also be -# a problem if the upgrade is e.g. because of a security fix). -#shutdown_clients = yes - -## -## Dictionary server settings -## - -# Dictionary can be used to store key=value lists. This is used by several -# plugins. The dictionary can be accessed either directly or though a -# dictionary server. The following dict block maps dictionary names to URIs -# when the server is used. These can then be referenced using URIs in format -# "proxy::<name>". - -dict { - #quota = mysql:/etc/dovecot/sql-dict.conf - #expire = sqlite:/etc/dovecot/sql-dict.conf -} - -# A config file can also tried to be included without giving an error if -# it's not found: -#!include_try /etc/dovecot/local.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/example-config/dovecot.conf.ext Thu Nov 05 18:39:36 2009 -0500 @@ -0,0 +1,77 @@ +## Dovecot configuration file + +# If you're in a hurry, see http://wiki.dovecot.org/QuickConfiguration + +# "dovecot -n" command gives a clean output of the changed settings. Use it +# instead of copy&pasting files when posting to the Dovecot mailing list. + +# '#' character and everything after it is treated as comments. Extra spaces +# and tabs are ignored. If you want to use either of these explicitly, put the +# value inside quotes, eg.: key = "# char and trailing whitespace " + +# Default values are shown for each setting, it's not required to uncomment +# those. These are exceptions to this though: No sections (e.g. namespace {}) +# or plugin settings are added by default, they're listed only as examples. +# Paths are also just examples with the real defaults being based on configure +# options. The paths listed here are for configure --prefix=/usr +# --sysconfdir=/etc --localstatedir=/var + +# Most of the actual configuration gets included here: +!include conf.d/*.conf + +# Protocols we want to be serving. +#protocols = imap pop3 lmtp + +# A comma separated list of IPs or hosts where to listen in for connections. +# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces. +# If you want to specify non-default ports or anything more complex, +# edit conf.d/master.conf. +#listen = *, :: + +# Disable LOGIN command and all other plaintext authentications unless +# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP +# matches the local IP (ie. you're connecting from the same computer), the +# connection is considered secure and plaintext authentication is allowed. +#disable_plaintext_auth = yes + +# Base directory where to store runtime data. +#base_dir = /var/run/dovecot/ + +# Greeting message for clients. +#login_greeting = Dovecot ready. + +# Space separated list of trusted network ranges. Connections from these +# IPs are allowed to override their IP addresses and ports (for logging and +# for authentication checks). disable_plaintext_auth is also ignored for +# these networks. Typically you'd specify your IMAP proxy servers here. +#login_trusted_networks = + +# Show more verbose process titles (in ps). Currently shows user name and +# IP address. Useful for seeing who are actually using the IMAP processes +# (eg. shared mailboxes or if same uid is used for multiple accounts). +#verbose_proctitle = no + +# Should all processes be killed when Dovecot master process shuts down. +# Setting this to "no" means that Dovecot can be upgraded without +# forcing existing client connections to close (although that could also be +# a problem if the upgrade is e.g. because of a security fix). +#shutdown_clients = yes + +## +## Dictionary server settings +## + +# Dictionary can be used to store key=value lists. This is used by several +# plugins. The dictionary can be accessed either directly or though a +# dictionary server. The following dict block maps dictionary names to URIs +# when the server is used. These can then be referenced using URIs in format +# "proxy::<name>". + +dict { + #quota = mysql:/etc/dovecot/sql-dict.conf + #expire = sqlite:/etc/dovecot/sql-dict.conf +} + +# A config file can also tried to be included without giving an error if +# it's not found: +#!include_try /etc/dovecot/local.conf