Re: [Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-05 Thread Marcin Mirosław
W dniu 2011-06-03 15:47, Timo Sirainen pisze: > On Fri, 2011-06-03 at 15:17 +0200, Marcin Mirosław wrote: >> DICT_QUOTA_DEL= ... >> DICT_QUOTA_INSERT= >> DICT_QUOTA_OTHER_ACTIONS= > > It's not that simple. If it would be simple, probably it would be done;) Thanks Timo, Duane, Marcus for all repli

Re: [Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-04 Thread Marcus Jodorf
Marcin Mirosław wrote: > In config snip from Marcus i can't find definition of "quota", what kind > of backend are you using? maildir? Sorry forgot that. I just use maildir quota. plugin { quota = maildir:User Quota } Timo already wrote about the problem with dict-quota and postgres.

Re: [Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-03 Thread Timo Sirainen
On Fri, 2011-06-03 at 15:17 +0200, Marcin Mirosław wrote: > W dniu 03.06.2011 13:51, Timo Sirainen pisze: > Helo Timo! > > You can't define your own SQL queries for dict quota. Besides being able > > to do such query, there's the problem that when recalculating quota it's > > done by deleting a row

Re: [Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-03 Thread Marcin Mirosław
W dniu 03.06.2011 13:51, Timo Sirainen pisze: Helo Timo! > You can't define your own SQL queries for dict quota. Besides being able > to do such query, there's the problem that when recalculating quota it's > done by deleting a row and inserting it back. You wouldn't want to do > that for your user

Re: [Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-03 Thread Duane Hill
Hello Marcin, Friday, June 3, 2011, 4:05:21 AM, you wrote: > Marcus, Duane, thanks for replies! > I'll answer in one mail. > In your config (Duane) quota is defined as 'dict:user::proxy::quota' it > needs dictionary to be configured ( > http://wiki2.dovecot.org/Quota/Dict > ) if i understood corr

Re: [Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-03 Thread Timo Sirainen
On Thu, 2011-06-02 at 16:48 +0200, Marcin Mirosław wrote: > i'd like to keep present quota in such two columns: > quota_dict_bytes integer NOT NULL DEFAULT 0, > quota_dict_messages integer NOT NULL DEFAULT 0 > > I read wiki a little and it looks i can't define own sql queries, they > appear to be

Re: [Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-03 Thread Marcin Mirosław
Marcus, Duane, thanks for replies! I'll answer in one mail. In your config (Duane) quota is defined as 'dict:user::proxy::quota' it needs dictionary to be configured ( http://wiki2.dovecot.org/Quota/Dict ) if i understood correctly. In config snip from Marcus i can't find definition of "quota", wha

Re: [Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-03 Thread Duane Hill
Hello Marcus, Thursday, June 2, 2011, 1:56:58 PM, you wrote: > Duane Hill wrote: > Am 02.06.2011 um 18:40 schrieb Duane Hill: >>> I read wiki a little and it looks i can't define own sql queries, they >>> appear to be hardcoded. Am i wrong? Is it possible to write own queries >>> to get/set qu

Re: [Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-02 Thread Marcus Jodorf
Duane Hill wrote: Am 02.06.2011 um 18:40 schrieb Duane Hill: >> I read wiki a little and it looks i can't define own sql queries, they >> appear to be hardcoded. Am i wrong? Is it possible to write own queries >> to get/set quota using such table schema? No problem. > I'm using mysql here with

Re: [Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-02 Thread Duane Hill
Thursday, June 2, 2011, 9:48:11 AM, Marcin wrote: > Hello! > I'd like to setup quota for for virtualusers, i'm using both maildir++ > and mdbox as storage, and i'm using postgresql to keep users. > I'm keeping all users data in one table: > [...] > login text NOT NULL, > domain text, > password te

[Dovecot] Custom sql query for keeping quota with dict-sql

2011-06-02 Thread Marcin Mirosław
Hello! I'd like to setup quota for for virtualusers, i'm using both maildir++ and mdbox as storage, and i'm using postgresql to keep users. I'm keeping all users data in one table: [...] login text NOT NULL, domain text, password text, quota_mb integer NOT NULL DEFAULT 0 [... other columns ...] i'