From 713c0e5b7eb306e7f0112b93dec90c13c3df9df5 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 6 Aug 2010 18:21:23 -0300 Subject: Dovecot configuration and amavisd-new setup --- templates/dovecot/dovecot-sql.conf.erb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'templates') 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 -- cgit v1.2.3