Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-02-01 Thread Robert Schetterer
Am 01.02.2014 11:18, schrieb mayu:
> The bytes col of quota2 table is in sync with squirrel(when the quota_rule =
> *:storage=1G is added in dovecot) so why cant the quota col of mailbox table
> can get sync with squirrel 
> ?

squirrel takes quota from imap, postfixadmin sets the quota for each
user in mysql dict, my guess, dont configure quota static, take it out
from sql ,on the fly at imap login


> 
> 
> 
> --
> View this message in context: 
> http://dovecot.2317879.n4.nabble.com/Postfixadmin-MySQL-Dovecot-2-and-quota-tp44217p46538.html
> Sent from the Dovecot mailing list archive at Nabble.com.
> 



Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-02-01 Thread mayu
The bytes col of quota2 table is in sync with squirrel(when the quota_rule =
*:storage=1G is added in dovecot) so why cant the quota col of mailbox table
can get sync with squirrel 
?



--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/Postfixadmin-MySQL-Dovecot-2-and-quota-tp44217p46538.html
Sent from the Dovecot mailing list archive at Nabble.com.


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-02-01 Thread Robert Schetterer
Am 01.02.2014 10:58, schrieb mayu:
> Thanks for the reply Robert .
> 
> The Check_Quota plugin is install with compatibility plugin and I have
> configured the config file of check_quota also .
> 
> Still it is not working :(
> 

you failed in config somewhere, i have
Postfixadmin/MySQL/Dovecot2/squirrelmail/quota running

reread all list advices and related faqs

> 
> 
> 
> --
> View this message in context: 
> http://dovecot.2317879.n4.nabble.com/Postfixadmin-MySQL-Dovecot-2-and-quota-tp44217p46535.html
> Sent from the Dovecot mailing list archive at Nabble.com.
> 



Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-02-01 Thread mayu
Check_ quota is installed properly because SM show quota related info . 
> If  the quota_rule = *:storage=1G  is added .But when its removed SM does
> not show quota info from postfixadmin .




--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/Postfixadmin-MySQL-Dovecot-2-and-quota-tp44217p46536.html
Sent from the Dovecot mailing list archive at Nabble.com.


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-02-01 Thread mayu
Thanks for the reply Robert .

The Check_Quota plugin is install with compatibility plugin and I have
configured the config file of check_quota also .

Still it is not working :(




--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/Postfixadmin-MySQL-Dovecot-2-and-quota-tp44217p46535.html
Sent from the Dovecot mailing list archive at Nabble.com.


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-02-01 Thread Robert Schetterer
Am 01.02.2014 10:26, schrieb mayu:
> Hello LuKreme ,
> 
> So How can I achieve this .If I remove the quota_rule = *:storage=1G  from
> dovecot ,SM does not show any quota related info .
> 
> I have used below link to configure it .
> 
> http://serverstutorial.wordpress.com/2012/12/28/postfix-mysql-postfixadmin-dovecot-roundcube-centos-5-7-updated/

you need install the squirrelmail quota plugin

http://www.squirrelmail.org/plugin_view.php?id=237

> 
> 
> 
> --
> View this message in context: 
> http://dovecot.2317879.n4.nabble.com/Postfixadmin-MySQL-Dovecot-2-and-quota-tp44217p46532.html
> Sent from the Dovecot mailing list archive at Nabble.com.
> 



Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-02-01 Thread mayu
Hello LuKreme ,

So How can I achieve this .If I remove the quota_rule = *:storage=1G  from
dovecot ,SM does not show any quota related info .

I have used below link to configure it .

http://serverstutorial.wordpress.com/2012/12/28/postfix-mysql-postfixadmin-dovecot-roundcube-centos-5-7-updated/



--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/Postfixadmin-MySQL-Dovecot-2-and-quota-tp44217p46532.html
Sent from the Dovecot mailing list archive at Nabble.com.


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-02-01 Thread Robert Schetterer
Am 01.02.2014 10:20, schrieb mayu:
> Thanks Benny for your reply . 
> 
> Postfixadmin is reflecting the used quota/assigned quota . Here used quota
> means the message send by each user .Mysql quota2 table is storing the used
> quota and   messages count  (send msg+the welcome message from postfix
> admin).The message count is not adding the inbox mails coming from different
> user .
> 
> I am trying to achieve below stmts:
> 
> 1.When I enter the quota value for each mail box in postfixadmin ,that quota
> value should reflect in squirrel mail .With this every user is aware of its
> quota value . Is it possible ??
> 
> Thanks in advance !!!
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://dovecot.2317879.n4.nabble.com/Postfixadmin-MySQL-Dovecot-2-and-quota-tp44217p46531.html
> Sent from the Dovecot mailing list archive at Nabble.com.
> 

from former mail to list

what about use something like this in

dovecot-sql.conf.ext

user_query = SELECT concat('/usr/local/virtual/', maildir) AS home, \


concat('*:bytes=', mailbox.quota) AS quota_rule, \

#when saving to Trash mailbox the user gets additional 50MB
"Trash:storage=+50240" AS quota_rule2, \
#when saving to Sent mailbox the user gets additional 50MB
"Sent:storage=+50240" AS quota_rule3, \
#when saving to Drafts mailbox the user gets additional 50MB
"Drafts:storage=+50240" AS quota_rule4, \
#when saving to Templates mailbox the user gets additional 50MB
"Templates:storage=+50240" AS quota_rule5, \
#when saving to Junk mailbox the user gets additional 50MB
"Junk:storage=+50240" AS quota_rule6, \
#when saving to Archives mailbox the user gets additional 50MB
"Archives:storage=+50240" AS quota_rule7, \

quota rules are not needed to configured here

but something like

concat('*:bytes=', mailbox.quota) AS quota_rule

fits with dovecot, postfixadmin, squirrelmail at my site


Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-02-01 Thread mayu
Thanks Benny for your reply . 

Postfixadmin is reflecting the used quota/assigned quota . Here used quota
means the message send by each user .Mysql quota2 table is storing the used
quota and   messages count  (send msg+the welcome message from postfix
admin).The message count is not adding the inbox mails coming from different
user .

I am trying to achieve below stmts:

1.When I enter the quota value for each mail box in postfixadmin ,that quota
value should reflect in squirrel mail .With this every user is aware of its
quota value . Is it possible ??

Thanks in advance !!!









--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/Postfixadmin-MySQL-Dovecot-2-and-quota-tp44217p46531.html
Sent from the Dovecot mailing list archive at Nabble.com.


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-01-31 Thread LuKreme

On 31 Jan 2014, at 09:52 , Benny Pedersen  wrote:

> On 2014-01-31 17:45, LuKreme wrote:
>> On 31 Jan 2014, at 06:54 , mayu  wrote:
>>> The mysql table is fetching the data stored in postfixadmin ,But squirrel in
>>> not fetching the quota value .If I add this line:
 quota_rule = *:storage=1G
 in conf.d/90-quota.conf file, it works, I mean squirrelmail gets and
 shows information (but not the one stored in db of course).
>> That seems like an issue with squirrel mail, not dovecot.
>> squirrelmail-us...@lists.sourceforge.net
> 
> this quota_rule is hardcoded in dovecot, thus not using postfixadmin quota 
> data
> 
> it have nothing to do with squirrelmail not showing correct quotas
> 
> will this here be a long thread ? :=)

Maybe.

I thought the post I replied to was saying that it DID work if the setting was 
hard coded but that SM was not reading the setting from the database.

-- 
99 percent of lawyers give the rest a bad name.



Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-01-31 Thread Benny Pedersen

On 2014-01-31 17:45, LuKreme wrote:

On 31 Jan 2014, at 06:54 , mayu  wrote:

The mysql table is fetching the data stored in postfixadmin ,But 
squirrel in

not fetching the quota value .If I add this line:

quota_rule = *:storage=1G
in conf.d/90-quota.conf file, it works, I mean squirrelmail gets and
shows information (but not the one stored in db of course).


That seems like an issue with squirrel mail, not dovecot.

squirrelmail-us...@lists.sourceforge.net


this quota_rule is hardcoded in dovecot, thus not using postfixadmin 
quota data


it have nothing to do with squirrelmail not showing correct quotas

will this here be a long thread ? :=)


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-01-31 Thread LuKreme

On 31 Jan 2014, at 06:54 , mayu  wrote:

> The mysql table is fetching the data stored in postfixadmin ,But squirrel in
> not fetching the quota value .If I add this line: 
>> quota_rule = *:storage=1G 
>> in conf.d/90-quota.conf file, it works, I mean squirrelmail gets and 
>> shows information (but not the one stored in db of course). 

That seems like an issue with squirrel mail, not dovecot.

squirrelmail-us...@lists.sourceforge.net


-- 
Oh and I could be a genius if I just put my mind to it And I, I could do
anything if only I could get 'round to it.



Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-01-31 Thread Benny Pedersen

On 2014-01-31 14:54, mayu wrote:

I have a same problem what Matt has faced but the soln u provided to 
Matt

was not helpful for me  .


lost tree here on that, but dovecot quotadict is just for showing quotas 
in postfixadmin, its not for displaying squotas in squirrelmail


check that dovecot quotas is setup to use postfixadmin sql tables with 
quotas first, this need to work before reporting back to postfixadmin 
works :)


in thunderbird it works if one remember to install quota extension, with 
means that imap_quota works, and so quotas is defined somewhere


please read docs in postfixadmin on it

i cant help more if not knowing what part is not working yet


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2014-01-31 Thread mayu
Hi ,

I have a same problem what Matt has faced but the soln u provided to Matt
was not helpful for me  .

I am using Postfixadmin ,Dovecot ,Squirrel ,postfix and check_quota plugin
for showing quota value .

The mysql table is fetching the data stored in postfixadmin ,But squirrel in
not fetching the quota value .If I add this line: 
>  quota_rule = *:storage=1G 
>in conf.d/90-quota.conf file, it works, I mean squirrelmail gets and 
>shows information (but not the one stored in db of course). 




Daniel Parthey wrote
> Hi Matt,
> 
> sounds like the quota is correctly updated in MySQL, but your roundcube
> isn't able to fetch quota information via IMAP.
> 
> Can you reproduce this via telnet or another IMAP client (e.g. Thunderbird
> with Quota Display Extension)?
> 
> Can you be so kind and post your whole dovecot config (doveconf -n)?
> 
> Are there any error messages in your dovecot logs regarding quota?
> 
> I think that quota_rule, quota_rule2, quota_rule3 etc. are applied in
> sequence, so if you only need one quota_rule, then it should be named
> quota_rule.
> 
> Regards
> Daniel
> 
> 
> 
> Matt <

> dovecot@

> > schrieb:
>>Hi all,
>>
>>I'm setting up a new email server based on the softwares list below:
>>
>>  * Postfix
>>  * Dovecot 2.0.9
>>  * MySQL
>>  * Postfixadmin 2.3.6
>>
>>My current problem is I'm unsure whether quota feature is well
>>configured or not.
>>In order to test and validate, I use Roundcubemail GUI which provides
>>percentage of the space used by the mailbox (quota should be applied
>>per
>>mailbox).
>>
>>Here, my dovecot configuration:
>>dovecot.conf:
>>dict {
>>  quotadict = mysql:/etc/dovecot/dovecot-dict-quota.conf
>>}
>>
>>dovecot-dict-quota.conf:
>>connect = host=localhost dbname=postfix user=postfix password=postfix
>>map {
>>pattern = priv/quota/storage
>>table = quota2
>>username_field = username
>>value_field = bytes
>>}
>>map {
>>pattern = priv/quota/messages
>>table = quota2
>>username_field = username
>>value_field = messages
>>}
>>
>>dovecot-sql.conf.ext:
>>driver = mysql
>>connect = host=localhost dbname=postfix user=postfix password=postfix
>>default_pass_scheme = PLAIN-MD5
>>password_query = SELECT username AS user, password, \
>>CONCAT('*:storage=', CAST(quota AS CHAR), 'b') AS quota_rule \
>>FROM mailbox WHERE username = '%u' AND active='1'
>>user_query = SELECT maildir, 89 AS uid, 12 AS gid, \
>>concat('dict:storage=',floor(quota/1000),'::proxy::quotadict') AS
>>quota, \
>>CONCAT('*:storage=', CAST(quota AS CHAR), 'b') AS quota_rule \
>>FROM mailbox WHERE username = '%u' AND active='1'
>>
>>conf.d/90-quota.conf:
>>plugin {
>>  quota = dict:user::proxy::quotadict
>>  quota_rule2 = Trash:storage=+10%%
>>}
>>
>>conf.d/20-imap.conf:
>>protocol imap {
>>  mail_plugins = $mail_plugins imap_quota
>>}
>>
>>When I check postfixadmin GUI, I can see that quota in realtime in
>>quota2 table, no problem.
>>
>>But Roundcubemail cannot get this information and shows a unknown
>>quota.
>>If I add this line:
>>  quota_rule = *:storage=1G
>>in conf.d/90-quota.conf file, it works, I mean roundcubemail gets and
>>shows information (but not the one stored in db of course).
>>
>>I think I'm close to the right configuration but I need your help to
>>complete this setup.
>>
>>Thank you in advance for your help.
>>
>>Best,
>>Matt





--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/Postfixadmin-MySQL-Dovecot-2-and-quota-tp44217p46523.html
Sent from the Dovecot mailing list archive at Nabble.com.


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2013-09-09 Thread Matt
>> userdb {
>>args = uid=vmail gid=vmail home=/var/mail/vmail/%d/%n
>>driver = static
>> }
Hum, forgot to modify this file

> Dynamic extra fields like "userdb_quota_rule" from SQL would not
> work with a static userdb, since static db is only able to return
> static extra fields.
>
> You will need to use userdb driver = sql to fetch quota_rule from SQL.
Changed.

> If it works, the following command should show the user's quota rule:
> doveadm user t...@test.com
And it works fine now !!!
I can get quota information from Roundcubemail and Thunderbird !!!

Many thanks !

Best,
Matt


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2013-09-08 Thread Daniel Parthey

Hi Matt

Am 08.09.2013 17:32, schrieb Matt:

I've installed the Quota Display Extension in my Thunderbird (thanks for
the plugin) and the progress bar remains desperately empty but it works
with my Gmail account.


This is exactly what was expected.
Dovecot userdb doesn't know about your user specific quota_rule.


userdb {
   args = uid=vmail gid=vmail home=/var/mail/vmail/%d/%n
   driver = static
}


Dynamic extra fields like "userdb_quota_rule" from SQL would not
work with a static userdb, since static db is only able to return
static extra fields.

You will need to use userdb driver = sql to fetch quota_rule from SQL.

If it works, the following command should show the user's quota rule:
doveadm user t...@test.com

Regards
Daniel


Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2013-09-08 Thread Matt
Hi Daniel,

Thanks for your quick feedback.

I've installed the Quota Display Extension in my Thunderbird (thanks for
the plugin) and the progress bar remains desperately empty but it works
with my Gmail account.

Sorry, I forgot the send my docevot -n previously:
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-358.el6.x86_64 x86_64 CentOS release 6.4 (Final) ext4
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
dict {
  quotadict = mysql:/etc/dovecot/dovecot-dict-quota.conf
}
mail_debug = yes
mail_location = maildir:/var/mail/vmail/%d/%n
mail_plugins = " quota"
mail_privileged_group = mail
mbox_write_locks = fcntl
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  quota = dict:user::proxy::quotadict
  quota_rule2 = Trash:storage=+10%%
}
postmaster_address = t...@test.com
quota_full_tempfail = yes
service dict {
  unix_listener dict {
group = mail
mode = 0660
user = vmail
  }
}
service imap-login {
  inet_listener imap {
port = 0
  }
}
service pop3-login {
  inet_listener pop3 {
port = 0
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  unix_listener quota-warning {
user = vmail
  }
  user = dovecot
}
ssl_cert = 
Sep  8 23:22:54 my_server dovecot: auth: Debug: sql(t...@test.com,::1):
query: SELECT username AS user, password, CONCAT('*:storage=',
CAST(quota AS CHAR), 'b') AS quota_rule FROM mailbox WHERE username =
't...@test.com' AND active='1'
Sep  8 23:22:54 my_server dovecot: auth: Debug: client out:
OK#0111#011user=t...@test.com#011quota_rule=*:storage=3072b
Sep  8 23:22:54 my_server dovecot: auth: Debug: master in:
REQUEST#011317980673#01112146#0111#0110725da6b7ab19fc4fac7f0cf54764b18
Sep  8 23:22:54 my_server dovecot: auth: Debug: master out:
USER#011317980673#011t...@test.com#011uid=5000#011gid=5000#011home=/var/mail/vmail/test.com/test
Sep  8 23:22:54 my_server dovecot: imap-login: Login:
user=, method=PLAIN, rip=::1, lip=::1, mpid=12147, TLS
Sep  8 23:22:54 my_server dovecot: imap: Debug: Loading modules from
directory: /usr/lib64/dovecot
Sep  8 23:22:54 my_server dovecot: imap: Debug: Module loaded:
/usr/lib64/dovecot/lib10_quota_plugin.so
Sep  8 23:22:54 my_server dovecot: imap: Debug: Module loaded:
/usr/lib64/dovecot/lib11_imap_quota_plugin.so
Sep  8 23:22:54 my_server dovecot: imap(t...@test.com): Debug: Effective
uid=5000, gid=5000, home=/var/mail/vmail/test.com/test
Sep  8 23:22:54 my_server dovecot: imap(t...@test.com): Debug: Quota
root: name=user backend=dict args=:proxy::quotadict
Sep  8 23:22:54 my_server dovecot: imap(t...@test.com): Debug: dict
quota: user=t...@test.com, uri=proxy::quotadict, noenforcing=0
Sep  8 23:22:54 my_server dovecot: imap(t...@test.com): Debug:
maildir++: root=/var/mail/vmail/test.com/test, index=, control=,
inbox=/var/mail/vmail/test.com/test
Sep  8 23:22:54 my_server dovecot: dict: mysql: Connected to localhost
(postfix)
Sep  8 23:22:54 my_server dovecot: imap(t...@ecritel.cn): Disconnected:
Logged out bytes=70/529
Sep  8 23:22:57 my_server dovecot: auth: Debug: auth client connected
(pid=12150)
Sep  8 23:22:57 my_server dovecot: auth: Debug: client in:
AUTH#0111#011PLAIN#011service=imap#011secured#011lip=::1#011rip=::1#011lport=993#011rport=39056#011resp=
Sep  8 23:22:57 my_server dovecot: auth: Debug: sql(t...@test.com,::1):
query: SELECT username AS user, password, CONCAT('*:storage=',
CAST(quota AS CHAR), 'b') AS quota_rule FROM mailbox WHERE username =
't...@test.com' AND active='1'
Sep  8 23:22:57 my_server dovecot: auth: Debug: client out:
OK#0111#011user=t...@test.com#011quota_rule=*:storage=3072b
Sep  8 23:22:57 my_server dovecot: auth: Debug: master in:
REQUEST#0111253179393#01112150#0111#0117aeb8af5e5292a96188f20b12f455c7c
Sep  8 23:22:57 my_server dovecot: auth: Debug: master out:
USER#0111253179393#011t...@test.com#011uid=5000#011gid=5000#011home=/var/mail/vmail/test.com/test
Sep  8 23:22:57 my_server dovecot: imap-login: Login:
user=, method=PLAIN, rip=::1, lip=::1, mpid=12152, TLS
Sep  8 23:22:57 my_server dovecot: imap: Debug: Loading modules from
directory: /usr/lib64/dovecot
Sep  8 23:22:57 my_server dovecot: imap: Debug: Module loaded:
/usr/lib64/dovecot/lib10_quota_plugin.so
Sep  8 23:22:57 my_server dovecot: imap: Debug: Module loaded:
/usr/lib64/dovecot/lib11_imap_quota_plugin.so
Sep  8 23:22:57 my_server dovecot: imap(t...@test.com): Debug: Effective
uid=5000, gid=5000, home=/var/mail/vmail/test.com/test
Sep  8 23:22:57 my_server dovecot: imap(t...@test.com): Debug: Quota
root: name=user backend=dict args=:proxy::quotadict
Sep  8 23:22:57 my_server dovecot: imap(t...@test.com): Debug: dict
quota: user=t...@test.com, uri=proxy::quotadict, noenforcing=0
Sep  8 23:22:57 my_server dovecot: imap(t...@test.com): Debug:
maildir++: root=/var/mail/vmail/test.com/test, index=, control=,
inbox=/var/mail/vmail/test.com/test
Sep  8 23:22:57 my_server dovecot: imap(t...@test.com): Disconnected:
Logged out bytes=305/1700
Sep  8 23:2

Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2013-09-08 Thread Daniel Parthey
Hi Matt,

I forgot to mention that if you're using userdb prefetch, then you might need 
to use userdb_quota_rule instead of quota_rule in your user_query.

Please have a look at the docs:
http://wiki2.dovecot.org/Quota/Configuration

Regards
Daniel

Re: [Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

2013-09-08 Thread Daniel Parthey
Hi Matt,

sounds like the quota is correctly updated in MySQL, but your roundcube isn't 
able to fetch quota information via IMAP.

Can you reproduce this via telnet or another IMAP client (e.g. Thunderbird with 
Quota Display Extension)?

Can you be so kind and post your whole dovecot config (doveconf -n)?

Are there any error messages in your dovecot logs regarding quota?

I think that quota_rule, quota_rule2, quota_rule3 etc. are applied in sequence, 
so if you only need one quota_rule, then it should be named quota_rule.

Regards
Daniel



Matt  schrieb:
>Hi all,
>
>I'm setting up a new email server based on the softwares list below:
>
>  * Postfix
>  * Dovecot 2.0.9
>  * MySQL
>  * Postfixadmin 2.3.6
>
>My current problem is I'm unsure whether quota feature is well
>configured or not.
>In order to test and validate, I use Roundcubemail GUI which provides
>percentage of the space used by the mailbox (quota should be applied
>per
>mailbox).
>
>Here, my dovecot configuration:
>dovecot.conf:
>dict {
>  quotadict = mysql:/etc/dovecot/dovecot-dict-quota.conf
>}
>
>dovecot-dict-quota.conf:
>connect = host=localhost dbname=postfix user=postfix password=postfix
>map {
>pattern = priv/quota/storage
>table = quota2
>username_field = username
>value_field = bytes
>}
>map {
>pattern = priv/quota/messages
>table = quota2
>username_field = username
>value_field = messages
>}
>
>dovecot-sql.conf.ext:
>driver = mysql
>connect = host=localhost dbname=postfix user=postfix password=postfix
>default_pass_scheme = PLAIN-MD5
>password_query = SELECT username AS user, password, \
>CONCAT('*:storage=', CAST(quota AS CHAR), 'b') AS quota_rule \
>FROM mailbox WHERE username = '%u' AND active='1'
>user_query = SELECT maildir, 89 AS uid, 12 AS gid, \
>concat('dict:storage=',floor(quota/1000),'::proxy::quotadict') AS
>quota, \
>CONCAT('*:storage=', CAST(quota AS CHAR), 'b') AS quota_rule \
>FROM mailbox WHERE username = '%u' AND active='1'
>
>conf.d/90-quota.conf:
>plugin {
>  quota = dict:user::proxy::quotadict
>  quota_rule2 = Trash:storage=+10%%
>}
>
>conf.d/20-imap.conf:
>protocol imap {
>  mail_plugins = $mail_plugins imap_quota
>}
>
>When I check postfixadmin GUI, I can see that quota in realtime in
>quota2 table, no problem.
>
>But Roundcubemail cannot get this information and shows a unknown
>quota.
>If I add this line:
>  quota_rule = *:storage=1G
>in conf.d/90-quota.conf file, it works, I mean roundcubemail gets and
>shows information (but not the one stored in db of course).
>
>I think I'm close to the right configuration but I need your help to
>complete this setup.
>
>Thank you in advance for your help.
>
>Best,
>Matt