Re: Dovecot domain quota

2014-10-13 Thread Jiri Bourek
On 13.10.2014 11:11, Gedalya wrote: On 10/13/2014 04:47 AM, Jiri Bourek wrote: As a hack: you can just not run quota recalc ;-) or more realistically, separately track user quotas individually (you really should!), and post recalc immediately update the domain by running something like update do

Re: Dovecot domain quota

2014-10-13 Thread Gedalya
On 10/13/2014 04:47 AM, Jiri Bourek wrote: As a hack: you can just not run quota recalc ;-) or more realistically, separately track user quotas individually (you really should!), and post recalc immediately update the domain by running something like update domain_quota set bytes=(select sum(byte

Re: Dovecot domain quota

2014-10-13 Thread Jiri Bourek
On 13.10.2014 00:08, Gedalya wrote: On 10/12/2014 01:28 PM, Filip Bartmann wrote: After running `doveadm quota recalc -A` I have in my db: --- +---++--+ | domain| bytes | messages | +---++--+ | debian.jd | 50575

Re: Dovecot domain quota

2014-10-12 Thread Gedalya
On 10/12/2014 01:28 PM, Filip Bartmann wrote: After running `doveadm quota recalc -A` I have in my db: --- +---++--+ | domain| bytes | messages | +---++--+ | debian.jd | 505758 | 81 | +---++

Re: Dovecot domain quota

2014-10-12 Thread Robert Schetterer
Am 12.10.2014 um 19:28 schrieb Filip Bartmann: > I have dovecot version 2.1.7 and I have quota configured as: > --- > dict { > quota_domain = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext > } > mail_plugins = quota > protocol imap { > mail_plugins = quota quota im

Dovecot domain quota

2014-10-12 Thread Filip Bartmann
I have dovecot version 2.1.7 and I have quota configured as: --- dict { quota_domain = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } mail_plugins = quota protocol imap { mail_plugins = quota quota imap_quota } plugin { quota = dict:domain:%d:proxy::quota_domai

Re: [Dovecot] domain quota in sql

2012-02-15 Thread Adam Szpakowski
On 15.02.2012 14:05, Timo Sirainen wrote: Is there a way to add domainname as another collumn in dbase? This will simplify the SQL query and the GROUP BY could be used. Not currently. Perhaps for v2.2 dict-sql redesign. It will be great feature. Well, yeah, it kind of works, but not 100% :) An

Re: [Dovecot] domain quota in sql

2012-02-15 Thread Timo Sirainen
On Wed, 2012-02-15 at 08:26 +0100, Adam Szpakowski wrote: > On 15.02.2012 02:55, Timo Sirainen wrote: > > On 15.2.2012, at 3.54, Timo Sirainen wrote: > > > >> Domain-quota support in Dovecot is only partial. Recalculating domain > >> quota would require more code. Last time when someone asked abou

Re: [Dovecot] domain quota in sql

2012-02-15 Thread Przemysław Orzechowski
Hi Im not an expert in Dovecot but what prohibits you adding a field to the table Dovecot will not use it thats all Im not sure what version of database You are using but postgres,oracle and never versions of mysql have something called views (could be used to hide the additional column from do

Re: [Dovecot] domain quota in sql

2012-02-15 Thread Adam Szpakowski
On 15.02.2012 09:19, Robert Schetterer wrote: as workaround it should be possible to calculate filllevel by domain with some bash script and cron sending an info mail to you might be not exact, but enough to see whats going on ( depends on your real domain/mailbox setup...maildir etc) [cut] I'm

Re: [Dovecot] domain quota in sql

2012-02-15 Thread Robert Schetterer
Am 15.02.2012 09:07, schrieb Adam Szpakowski: > On 15.02.2012 08:47, Robert Schetterer wrote: >> Hi i am not sure what are trying to goal >> with domain quota, if you setup your accounts i.e with postfixadmin etc >> then its up to the gui logic , stopping postmasters to setup more >> accounts ( wit

Re: [Dovecot] domain quota in sql

2012-02-15 Thread Adam Szpakowski
On 15.02.2012 08:47, Robert Schetterer wrote: Hi i am not sure what are trying to goal with domain quota, if you setup your accounts i.e with postfixadmin etc then its up to the gui logic , stopping postmasters to setup more accounts ( with quotas ) as you ( the superadmin ) want. My fault, I sh

Re: [Dovecot] domain quota in sql

2012-02-14 Thread Robert Schetterer
Am 15.02.2012 08:26, schrieb Adam Szpakowski: > On 15.02.2012 02:55, Timo Sirainen wrote: >> On 15.2.2012, at 3.54, Timo Sirainen wrote: >> >>> Domain-quota support in Dovecot is only partial. Recalculating domain >>> quota would require more code. Last time when someone asked about >>> this I wasn

Re: [Dovecot] domain quota in sql

2012-02-14 Thread Adam Szpakowski
On 15.02.2012 02:55, Timo Sirainen wrote: On 15.2.2012, at 3.54, Timo Sirainen wrote: Domain-quota support in Dovecot is only partial. Recalculating domain quota would require more code. Last time when someone asked about this I wasn't even sure how it could be implemented, but nowadays it ac

Re: [Dovecot] domain quota in sql

2012-02-14 Thread Timo Sirainen
On 15.2.2012, at 3.54, Timo Sirainen wrote: > Domain-quota support in Dovecot is only partial. Recalculating domain quota > would require more code. Last time when someone asked about this I wasn't > even sure how it could be implemented, but nowadays it actually would be > possible to do with:

Re: [Dovecot] domain quota in sql

2012-02-14 Thread Timo Sirainen
On 14.2.2012, at 23.29, Adam Szpakowski wrote: > Hi, > I have a problem with setting up quota usage tracking for domains. > Problem is, that domain quota is always based on only one user in domain, the > last one on whom behalf any operation was performed. > To recreate this situation, one has on

[Dovecot] domain quota in sql

2012-02-14 Thread Adam Szpakowski
Hi, I have a problem with setting up quota usage tracking for domains. Problem is, that domain quota is always based on only one user in domain, the last one on whom behalf any operation was performed. To recreate this situation, one has only to perform: doveadm quota recalc -u USER on a user, a

Re: [Dovecot] domain quota dictionary

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 18:29 +0300, alex wrote: > > Yes, that's what I tried to say in my previous mail. There is no easy > > (automatic) way to initialize or recalculate domain quota. > > > > > Thanks Timo > > What will be the hard way? > A quick and nasty fix, I think, will be to do a cron script

Re: [Dovecot] domain quota dictionary

2010-07-14 Thread alex
On 07/14/2010 06:22 PM, Timo Sirainen wrote: On Wed, 2010-07-14 at 18:07 +0300, alex wrote: The domain_quota is updated only with the new message. The two messages and sizes, that already exists are not added to the domain quota. Yes, that's what I tried to say in my previous mail. There is n

Re: [Dovecot] domain quota dictionary

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 18:07 +0300, alex wrote: > The domain_quota is updated only with the new message. The two messages > and sizes, that already exists are not added to the domain quota. Yes, that's what I tried to say in my previous mail. There is no easy (automatic) way to initialize or reca

Re: [Dovecot] domain quota dictionary

2010-07-14 Thread alex
On 07/14/2010 05:55 PM, Timo Sirainen wrote: On Wed, 2010-07-14 at 17:42 +0300, alex wrote: - login with the first user .. ..so far so good - login with the second user ..domain quota usage is unchange and messages the same. A login doesn't change quota (the first login recalculat

Re: [Dovecot] domain quota dictionary

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 17:42 +0300, alex wrote: > - login with the first user .. > ..so far so good > > - login with the second user > > ..domain quota usage is unchange and messages the same. A login doesn't change quota (the first login recalculates it, because there is no row in dict).

Re: [Dovecot] domain quota dictionary

2010-07-14 Thread alex
On 07/14/2010 05:20 PM, Timo Sirainen wrote: On Wed, 2010-07-14 at 13:38 +0300, alex wrote: and the dovecot-quota-domain.conf looks like this : Looks ok. The problem is that the dictionary table gets updated only with the first mailbox informations (quota and messages for the first mailbox

Re: [Dovecot] domain quota dictionary

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 13:38 +0300, alex wrote: > and the dovecot-quota-domain.conf looks like this : Looks ok. > The problem is that the dictionary table gets updated only with the > first mailbox informations (quota and messages for the first mailbox > within domain that is accessed). What e

Re: [Dovecot] domain quota dictionary

2010-07-14 Thread alex
At least can anyone explain what is the "pattern" from the map definition. On 07/14/2010 01:38 PM, alex wrote: Hi I just configure dovecot with the second dictionary for the domain quota dict { quotadict = mysql:/usr/local/etc/dovecot-quota.conf quota_domain = mysql:/usr/local/etc/dovecot-quot

[Dovecot] domain quota dictionary

2010-07-14 Thread alex
Hi I just configure dovecot with the second dictionary for the domain quota dict { quotadict = mysql:/usr/local/etc/dovecot-quota.conf quota_domain = mysql:/usr/local/etc/dovecot-quota-domain.conf } plugin { quota = dict:user::proxy::quotadict quota2 = dict:domain:%d:proxy::quota_do