[Dovecot] dsync replication: quota counted twice
Hi
I enabled quota + warnings in my replication test setup and now whenever a mail gets delivered the quota is counted twice (probably due to both servers using the same mysql quota backend) and quota warnings are fired too early. After a doveadm quota recalc -u <username> the quota is correct again. How do I make dovecot only count the quota on the server where the mail was added originally?
dovecot -n is the same as in my previous message to the list today http://www.dovecot.org/list/dovecot/2013-April/089558.html (thanks Timo for the hint in this thread btw, changing the permissions made the errors go away)
Thanks Oli
-- message transmitted on 100% recycled electrons
On 8.4.2013, at 13.05, Oli Schacher dovecot@lists.wgwh.ch wrote:
I enabled quota + warnings in my replication test setup and now whenever a mail gets delivered the quota is counted twice (probably due to both servers using the same mysql quota backend)
Yes. Dovecot doesn't know that they are the same quota backend.
and quota warnings are fired too early. After a doveadm quota recalc -u <username> the quota is correct again. How do I make dovecot only count the quota on the server where the mail was added originally?
There's no way to make quota work reliably that way. You need to use different quota backends. Either two mysql databases (or tables), or the other Dovecot could simply be using a dict file quota.
On Mon, 8 Apr 2013 13:15:54 +0300 Timo Sirainen tss@iki.fi wrote:
There's no way to make quota work reliably that way. You need to use different quota backends. Either two mysql databases (or tables), or the other Dovecot could simply be using a dict file quota.
ok, thanks for the clarification. Using two different tables does the trick. I'll probably also have to disable the quota-warning scripts on one of the servers. Currently, both servers run the script when a account goes overquota -> two hate-mails in the user's Inbox.
On 8.4.2013, at 14.56, Oli Schacher dovecot@lists.wgwh.ch wrote:
On Mon, 8 Apr 2013 13:15:54 +0300 Timo Sirainen tss@iki.fi wrote:
There's no way to make quota work reliably that way. You need to use different quota backends. Either two mysql databases (or tables), or the other Dovecot could simply be using a dict file quota.
ok, thanks for the clarification. Using two different tables does the trick. I'll probably also have to disable the quota-warning scripts on one of the servers. Currently, both servers run the script when a account goes overquota -> two hate-mails in the user's Inbox.
Ah. Hmm. This should solve it: http://hg.dovecot.org/dovecot-2.2/rev/54cdc5b6727c
On Mon, 8 Apr 2013 15:14:18 +0300 Timo Sirainen tss@iki.fi wrote:
ok, thanks for the clarification. Using two different tables does the trick. I'll probably also have to disable the quota-warning scripts on one of the servers. Currently, both servers run the script when a account goes overquota -> two hate-mails in the user's Inbox.
Ah. Hmm. This should solve it: http://hg.dovecot.org/dovecot-2.2/rev/54cdc5b6727c
Thanks a lot..this seems to work, only server1 sends a quota warning now. maillog shows an (empty) error, but the script runs anyway:
Apr 8 15:16:38 fumailsynctest1 dovecot: quota-warning: Error: close failed in file object destructor: Apr 8 15:16:38 fumailsynctest1 dovecot: quota-warning: Error: Error in sys.excepthook: Apr 8 15:16:38 fumailsynctest1 dovecot: quota-warning: Error: Apr 8 15:16:38 fumailsynctest1 dovecot: quota-warning: Error: Original exception was:
participants (2)
-
Oli Schacher
-
Timo Sirainen