summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/dovecot/dovecot-sql.conf.erb5
1 files changed, 5 insertions, 0 deletions
diff --git a/templates/dovecot/dovecot-sql.conf.erb b/templates/dovecot/dovecot-sql.conf.erb
index 7661e25..c5c7f87 100644
--- a/templates/dovecot/dovecot-sql.conf.erb
+++ b/templates/dovecot/dovecot-sql.conf.erb
@@ -26,6 +26,7 @@
# Database driver: mysql, pgsql, sqlite
#driver =
+driver = mysql
# Database connection string. This is driver-specific setting.
#
@@ -55,6 +56,7 @@
# connect = /etc/dovecot/authdb.sqlite
#
#connect = dbname=virtual user=virtual
+connect = host=<%= postfixadmin_hosts %> dbname=<%= postfixadmin_dbname %> user=<%= postfixadmin_user %> password=<%= postfixadmin_password %>
# Default password scheme.
#
@@ -62,6 +64,7 @@
# http://wiki.dovecot.org/Authentication/PasswordSchemes
#
#default_pass_scheme = PLAIN-MD5
+default_pass_scheme = MD5-CRYPT
# Query to retrieve the password.
#
@@ -89,6 +92,7 @@
# password_query = SELECT pw AS password FROM users WHERE userid = '%u' AND active = 'Y'
#
#password_query = SELECT userid as user, password FROM users WHERE userid = '%u'
+password_query = SELECT username AS user,password FROM mailbox WHERE username = '%u' AND active='1'
# Query to retrieve the user information.
#
@@ -109,6 +113,7 @@
# user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u'
#
#user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
+user_query = SELECT maildir, 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%u' AND active='1'
# 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