@dev_team If you have a mail quota in place a users mailbox will be listed under Mail quota as soon as there is mail in his mailbox.
Now, if you are going to change the users mail quota to a different value by using Custom mailbox quota the view under Mail quota is not updated any more and calculations done on this page are not correct, too for this user.
It’s always reproducible here (new user or existing user).
correct, no update if done as admin. Also a server restart doesn’t change it.
But just recognised, that if the user with quota setting is logged into sogo it is updated!
What if the user has an imap connection?
And even more:
If the user is not logged in and the quota appears to be correct, then the next mail the users receives will reset the display to standard quota!
I was coming from NS6.8 and there it is updated as soon as the admin sets a new value.
If you have a general quota of e.g. 2GB set and some users with a bigger personal quota (let’s say 5GB), then these users will not get mails anymore, because of the the bug which resets user quota to standard quota each time the user gets an email. Then a user with a 5GB Mailbox is over his limit and the sender will get this answer:
This is the mail system at host dc2.intern.org.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<testuser@intern.org>: host dc2.intern.org[/var/run/dovecot/lmtp] said: 552
5.2.2 <testuser@intern.org> Quota exceeded (mailbox for user is full) (in
reply to end of DATA command)
So user specific quotas can not be used at the moment!
Well, I’ve investigated the configuration and confirm the custom user quota is not enforced when a new message arrives (during delivery). Changing the current behavior to enforce the limit requires a major modification in the dovecot userdb configuration.
However I’m not sure enforcing the quota during delivery is a good solution, because IMO it’s better to deliver a message instead of accepting, discarding it and return a bounce to the sender. The message could be important.
Having said that, to get a more predictable behavior, I propose to change the general quota value applied by dovecot to be the maximum value between users custom quota and default quota. In this way, when connecting by IMAP the custom quota is applied, whilst when a message is delivered the “maximum” is applied.
For instance:
default 2GB, boss 7GB, guest 1GB
max(default, boss, guest) = 7GB
In this example every mailbox accepts new messages up to 7GB. When a default user or guest connects by IMAP see his mailbox full. He should delete some messages.
I think this is not the expected behaviour of the quota management
if I set 2 GB for all users and 30 for a special account, I don’t want all users to have 30 GB limit
I think we should split the problem/solution into 2 parts:
1.) Repair view
If we set a custom quota, then we need to see this on the page for quotas. At them moment we usually do not see it there, because the user set quota gets changed to default as soon as a mail is received for his mailbox. Hope you can reproduce this. The quota page does not show much useful information at the moment.
2.) Setting a quota must have an effect
Usually I do this to force users to clean up their mailboxes. What we could do is:
a) send user a mail if his quota is nearly reached (e.g. <=10% capacity left)
b) block him from sending further messages if he reached his quota or before he reached it.
c) block incoming messages if mailbox is over quota
d) block incoming messages if mailbox over quota but notify admin or user, too
(a-b-c) is what exchange does (exchange knows a quota for not allowed to send any more and a higher quota where no messages are received any more) and this method does it’s job out in the field.
I think it’s not good to receive mails if mailbox is over the quota!! This would sooner or later fill up your entire HD.
And it’s also not good to assume the max quota found in the system as general max. This would be too much and again your HD would be out of storage. Let’s look to a setup with 100 Mailboxes most 1GB Limit some 5GB Limit. Let’s assume we have a 250GB HD. Mails would come in until Mailboxes filled up with 100*5GB =500GB, but your HD is 250GB only…
So my recommendation - keep it simple for the beginning:
repair view of quota page
do not accept mail from user or from outside if quota is over it’s limit (guess that’s how it is now and as it is done by most mail servers out)
we need to give user a chance to know about his quota. Sogo und Roundcube will show it anyway, but what if they are working with Thunderbird or pure imap? Thats why the should get a notification best before their box is filled up. To keep it simple the notification could be the warning sent out to sender if quota is reached.
If I want to see the correct Max. size in quota page of my already exiting users, I have to edit and submit each user mailbox. Reboot of mailserver service or server itself doesn’t do anything. This is not a problem but worth to know about. Same applies if you change the default quota later. This will not have an immediate effect on your existing mailboxes! My Impression was, that you said that this is fixed now?
Max. size is not changed for user root. This mailbox is still on the old default value of 2GB, even I do have 1.5GB as default now. I have no idea where to change this, but it is not important, too. Is it by design like this? The user root can be seen in Mail quota only.
Last not least there is a user vmail in Mail quota page with an old default vale of 5GB even I do have 1.5GB now. Where can I change this quota ? I think this is important, as shared Folders are part of daily life operations - so the should have a quota.
Pls. let me know your thoughts on that!
Good point about IMAP quota extension - I have to look about this…
No reboots needed. Existing installation should be fixed as follow:
accounts with custom quota: run once the command doveadm quota recalc -A (I could execute it automatically when the RPM is updated)
accounts with default quota (and custom quota, too): the next delivered message, or the next IMAP login should fix the quota value
root and vmail users have unlimited quota. This cannot be changed from the UI by now. The vmail account hosts the shared mailboxes. Both root and vmail: the next delivered message, or the next IMAP login should fix the quota value.
When the default quota is applied, only the next IMAP login or the next incoming message refresh the mail quota status page: case 3 seems to fail here.