From c1fcaed2ee8f05a5030fe4e8e211ca4eae7a9489 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Tue, 11 Jun 2013 11:44:57 -0400
Subject: [PATCH] - Fixed FS#2921 - RBL list field in server config can not be empty.

---
 install/tpl/debian_dovecot-sql.conf.master |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/install/tpl/debian_dovecot-sql.conf.master b/install/tpl/debian_dovecot-sql.conf.master
index f8b103c..9c55df3 100644
--- a/install/tpl/debian_dovecot-sql.conf.master
+++ b/install/tpl/debian_dovecot-sql.conf.master
@@ -120,8 +120,10 @@
 connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password}
 default_pass_scheme = CRYPT
 
-password_query = SELECT password FROM mail_user WHERE login = '%u' AND disable%Ls = 'n'
-# user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE login = '%u' AND disable%Ls = 'n'
+password_query = SELECT password FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n'
 user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n'
 
+# The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
+# Do not enable it on Dovecot 1.x servers
+# iterate_query = SELECT email as user FROM mail_user
 

--
Gitblit v1.9.1