From ef56c9a12d5392d5b29450564d6dac5fd5fe957b Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 30 Apr 2010 12:23:07 -0400
Subject: [PATCH] Fixed: FS#1180 - Quota in dovecot setups calculated wrong.

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

diff --git a/install/tpl/debian_dovecot-sql.conf.master b/install/tpl/debian_dovecot-sql.conf.master
index 6e51db3..523237d 100644
--- a/install/tpl/debian_dovecot-sql.conf.master
+++ b/install/tpl/debian_dovecot-sql.conf.master
@@ -121,6 +121,6 @@
 default_pass_scheme = CRYPT
 
 password_query = SELECT password FROM mail_user WHERE email = '%u' AND disable%Ls = 'n'
-user_query = SELECT email as user, maildir as home, CONCAT(maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', quota) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n'
+user_query = SELECT email as user, maildir as home, CONCAT(maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n'
 
 
diff --git a/install/tpl/fedora_dovecot-sql.conf.master b/install/tpl/fedora_dovecot-sql.conf.master
index 71b0c58..3053e3c 100644
--- a/install/tpl/fedora_dovecot-sql.conf.master
+++ b/install/tpl/fedora_dovecot-sql.conf.master
@@ -134,4 +134,4 @@
 default_pass_scheme = CRYPT
 
 password_query = SELECT password FROM mail_user WHERE email = '%u' AND disable%Ls = 'n'
-user_query = SELECT email as user, maildir as home, CONCAT(maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', quota) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n'
+user_query = SELECT email as user, maildir as home, CONCAT(maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n'

--
Gitblit v1.9.1