Re: [Dovecot] default mail quota when using per user quota (news1204: message 6 of 20)

2012-05-14 Thread Timo Sirainen
On Wed, 2012-05-09 at 10:28 +0300, Nikolaos Milas wrote:
 May  9 10:01:16 vdev dovecot: auth: Debug: ldap(tester1): user search: 
 base=ou=people, dc=noa, dc=gr scope=onelevel filter=(uid=tester1) 
 fields=roomNumber,uid
 May  9 10:01:16 vdev dovecot: auth: Debug: ldap(tester1): result: 
 uid=tester1; roomNumber missing
 May  9 10:01:16 vdev dovecot: auth: Debug: master out: USER 1 
 tester1  quota_rule=*:bytes= home=/home/vmail/tester1
..
 So, in essence, when there is an explicitly defined quota for an account 
 (as with tester2 above), doveadm returns the limit correctly; if not (as 
 with tester1), it should get the default quota value, but it doesn't.

Fixed  added to regression tests:
http://hg.dovecot.org/dovecot-2.1/rev/4bbc12a87a29




Re: [Dovecot] default mail quota when using per user quota (news1204: message 6 of 20)

2012-05-14 Thread Nikolaos Milas

On 14/5/2012 7:31 μμ, Timo Sirainen wrote:


Fixed  added to regression tests:
http://hg.dovecot.org/dovecot-2.1/rev/4bbc12a87a29


Thank you Timo.

Nick


Re: [Dovecot] default mail quota when using per user quota (news1204: message 6 of 20)

2012-05-09 Thread Nikolaos Milas

On 23/4/2012 1:34 μμ, Timo Sirainen wrote:


What do you get in logs with auth_debug=yes?


Sorry for being late in responding.

When I run:

# doveadm quota get -u tester1
Quota name TypeValue Limit %
User quota STORAGE 0 - 0
User quota MESSAGE 1 - 0

# doveadm quota get -u tester2
Quota name TypeValue Limit %
User quota STORAGE 0 20480 0
User quota MESSAGE 1 - 0

Then in the logs:

---

May  9 10:01:16 vdev dovecot: auth: Debug: master in: USER  1   
tester1  service=doveadm
May  9 10:01:16 vdev dovecot: auth: Debug: ldap(tester1): user search: 
base=ou=people, dc=noa, dc=gr scope=onelevel filter=(uid=tester1) 
fields=roomNumber,uid
May  9 10:01:16 vdev dovecot: auth: Debug: ldap(tester1): result: 
uid=tester1; roomNumber missing
May  9 10:01:16 vdev dovecot: auth: Debug: master out: USER 1 
tester1  quota_rule=*:bytes= home=/home/vmail/tester1
May  9 10:01:29 vdev dovecot: auth: Debug: master in: USER  1   
tester2  service=doveadm
May  9 10:01:29 vdev dovecot: auth: Debug: ldap(tester2): user search: 
base=ou=people, dc=noa, dc=gr scope=onelevel filter=(uid=tester2) 
fields=roomNumber,uid
May  9 10:01:29 vdev dovecot: auth: Debug: ldap(tester2): result: 
uid=tester2 roomNumber=20M
May  9 10:01:29 vdev dovecot: auth: Debug: master out: USER 1   
tester  quota_rule=*:bytes=20M  home=/home/vmail/tester2


---

So, in essence, when there is an explicitly defined quota for an account 
(as with tester2 above), doveadm returns the limit correctly; if not (as 
with tester1), it should get the default quota value, but it doesn't.


Nick



Re: [Dovecot] default mail quota when using per user quota (news1204: message 6 of 20)

2012-04-23 Thread Timo Sirainen
On 21.4.2012, at 13.53, Nikolaos Milas wrote:

 On 21/4/2012 12:54 πμ, Timo Sirainen wrote:
 
 Hm. Or maybe I broke it in v2.1 when I changed this code. I'll also check 
 later.

Just tried, it works as expected.

 I'm afraid that's possible. The same configuration in 2.0.13 produces 
 (doveadm quota get -u tester):
 
 Quota name Type Value Limit %
 User quota STORAGE 237803 4194304 5
 User quota MESSAGE 531 - 0
 
 and in 2.1.1:
 
 Quota name Type Value Limit %
 User quota STORAGE 0 - 0
 User quota MESSAGE 0 - 0
 
 (In the latter test server value should be 0 - because there are no messages 
 there - but limit should be as above.
 Things do not change after: doveadm quota recalc -u tester)

What do you get in logs with auth_debug=yes?

Re: [Dovecot] default mail quota when using per user quota (news1204: message 6 of 20)

2012-04-21 Thread Nikolaos Milas

On 21/4/2012 12:54 πμ, Timo Sirainen wrote:


Hm. Or maybe I broke it in v2.1 when I changed this code. I'll also check later.


I'm afraid that's possible. The same configuration in 2.0.13 produces 
(doveadm quota get -u tester):


Quota name Type Value Limit %
User quota STORAGE 237803 4194304 5
User quota MESSAGE 531 - 0

and in 2.1.1:

Quota name Type Value Limit %
User quota STORAGE 0 - 0
User quota MESSAGE 0 - 0

(In the latter test server value should be 0 - because there are no 
messages there - but limit should be as above.

Things do not change after: doveadm quota recalc -u tester)

Regards,
Nick




Re: [Dovecot] default mail quota when using per user quota (news1204: message 6 of 20)

2012-04-20 Thread Andreas Helmcke
Am 20.04.2012 23:18, schrieb Timo Sirainen:
 By not set you mean it doesn't exist at all, or it exists but is empty?

I tried both (at least I do think I tried both).

 If dcMailQuota isn't returned, then the global quota_rule is used. If it is 
 returned as empty, I guess it gets treated as unlimited quota. There's 
 currently no easy way avoid this (a difficult way could be e.g. post-login 
 scripting, but that works only for imap/pop3).
 

Maybe openldap does not distingish between this cases. I will try again on
monday, when I am back at work.



Re: [Dovecot] default mail quota when using per user quota (news1204: message 6 of 20)

2012-04-20 Thread Timo Sirainen
On 21.4.2012, at 0.47, Andreas Helmcke wrote:

 If dcMailQuota isn't returned, then the global quota_rule is used. If it is 
 returned as empty, I guess it gets treated as unlimited quota. There's 
 currently no easy way avoid this (a difficult way could be e.g. post-login 
 scripting, but that works only for imap/pop3).
 
 
 Maybe openldap does not distingish between this cases. I will try again on
 monday, when I am back at work.

Hm. Or maybe I broke it in v2.1 when I changed this code. I'll also check 
later. :)