1

Topic: Domain and user-quota

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 4.0
- Deployed with iRedMail Easy or the downloadable installer? INSTALLER
- Linux/BSD distribution name and version: UBUNTU 16.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): APACHE 2.4.39
- Manage mail accounts with iRedAdmin-Pro? YES
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I have a question about the quota-system in iREdmail.

== Observation ==
When I create a new mail-domain with an unlimited quota, I'm also able to create mailusers under that domain with an unlimited quota; that's expected.
When I change the quota for that domain from unlimited to a fix value, the previously created, the unlimited mailusers are not effected. When I now change something of the unlimited mailuser, even if it's unrelated to their quota, like the phone-number or timezone, that user gets all the remaining space of that domain-quota.
When I create a new user under a domain with a domain-quota, that newly created mailuser takes all the remaining space of the domain-quota, even when the quota-field left empty or set to zero ("0").

== My Problem ==
I have a domain with a fixed quota of 25GB and an amount of user that vary. Therefore giving every current user (50 right now) a fixed quota, would prevent me from creating new users if necessary, unless I change the quota of some users manually to create free quota-space.
My second problem is, that some mailusers need mailboxes up to 3GB, while others barely use them and only have mailboxes up to 10MB. Unfortunately I can't tell when which users needs a bigger mailbox-quota or when a new user should be created, since that work should be done by the domainadmin (I'm a global admin).

== My Wish ==
Therefore I wanted to know if it's possible to create a domain with a fixed quota but an "unlimited" amount of users with an unlimited user-quota, where the limiting factor is solely the domainquota, so I don't have to adjust user-quotas manually, when something is changing (number of users and /or their size of mailboxes).

Hopefully my question is comprehensible.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Domain and user-quota

sorakrates wrote:

create a domain with a fixed quota but an "unlimited" amount of users with an unlimited user-quota, where the limiting factor is solely the domainquota, so I don't have to adjust user-quotas manually, when something is changing (number of users and /or their size of mailboxes).

I have no idea how to implement this. sad

3

Re: Domain and user-quota

Hello,

thank you for your answer and apologize my late response. I hope my english wasn't a barrier in understanding the issue.
I hope I'm not too pushy if I try to make my issue more clear one more time in my response.


That whole idea with unlimited size of Mailboxes in a limited domain quota enviroment came up, due to the fact that an earler created, unlimited mailbox keeps the unlimited status, even when the you set a domain quota later.

Right now some of my Domains look like this
------------------------------------------------------------
example.com - 20GB

user1@example.com - unlimited  -> (created before a domain-quota for example.com has been set)
user2@example.com - 200MB/2GB -> (created after a domain-quota for example.com has been set)
...
...
------------------------------------------------------------

It's a mix of limited and unlimited mailboxes under a domain with a set domain quota.
In the scenario above it is possible to create e.g. 10 mailboxes with a 2GB quota.

[1.] I can't create a Mailbox without a fix quota, as long as the Domain also has a fixed quota.
[2.] When I remove the domain quota I'm able to create mailboxes with an unlimited quota.
[3.] If I set a domain-quota again after I created these unlimited mailboxes, the mailboxes keep the status unlimited, as long as  I don't change anything about that mailbox.
[3.1] The moment I change something, for example the surname of the mailbox-user, that mailbox would grab all of the remaining domain-quota (e.g. all of the 20GB, or whatever is left).

Especially the behaviour descriped under 3.1 makes managing larger amounts of mailboxes in a fixed domain-quota enviroment tedious.

My question now is,: "

A. is there a way to create mailboxes with an unlimited quota, without first removing the domain-quota and
B. is the behaviour descripted under 3.1 is intended or is there a way that these unlimited mailboxes keep their unlimited status even after I chnage something for that mailbox?"


Hopefully that made it more clear. If my problem still isn't fixable or due to  how iRedmail is intended to work isn't a problem at all,  I'll close the Ticket.

4

Re: Domain and user-quota

sorakrates wrote:

B. is the behaviour descripted under 3.1 is intended

Intended, used to force the sum the quota of all mailboxes under this domain will not exceed the domain quota.

Maybe we can add a small checkbox under the mailbox quota input field to allow unlimited quota for this user.
e.g.

Mailbox Quota: ____________[MB]
                       [x] Set to unlimited quota

5

Re: Domain and user-quota

Hello @ZhangHuangbin.

An option like the one that you proposed would be a good idea.

Just for me to understand how checking the Domainquota works:"Right now iRedadmin only monitors the ratio between the domain-quota and the already set user-quotas, right? There's no way to monitor the currently in use user-space, not the fixed user-quota, and rate this value against the domain-quota, as far as I understand, correct?"

--- EXAMPLE ---
In Use /Fixed-Quota - (500MB/3GB)
Domain-Quota - (10GB)

From my understanding iRedadmin calculates 7GB of free Domain-Space and has no possibility to know that actually only 500MB are used and that in fact 9,5GB would be free.

--- EXAMPLE ---

Is the domain-quota still monitored if you add that checkbox, or will this option ignore domain-quotas at all?
From my understanding, as describes above, only the fixed user-quota is summed up until it matches the domain-quota. For me that sounds like the checkbox would bypass the quota-check. Is that right?

6

Re: Domain and user-quota

The original idea was bypassing per-domain quota limit while submitting form, but we need a way to store this "bypassing" option somewhere so that next time it will be toggled on (saved after last time you submitted the checkbox).

For SQL backends, maybe we can save it in column "mailbox.settings" because it's used for per-user settings.
For LDAP backends, use 'accountSetting' attribute.

This option should be available to only global admin, right?

7

Re: Domain and user-quota

Hello,

I know, very delayed response, sorry.
Actually the option to create users with unlimited Mailbox-Space in a quota-restricted Domain-space should be available to domain admins too, since the current situation is that a domain admin manages a particular domain by himself.

It would be nice if the domainadmin would also be able to create such users.

My initial thought was, if it would be possible just to look at the currently used space and compare it to the domain-quota, ignoring the middle value of reserved Space (if you look at the domainoverview in iRedadmin)

Example:
100% (12 GB / 18 GB / 20 GB)

The 100% refering to the 2nd coloumn of 18GB (the space for already created mailusers). So my idea was, wouldn't it be possible just to check the 1st coloumn (12GB, currently used space) against the 3rd coloumn (20GB, domain-quota)?

This way creating mailusers with fix quotas would be obsolete since you would monitor the currently used space and regardless of created mailaccounts.

8

Re: Domain and user-quota

sorakrates wrote:

Actually the option to create users with unlimited Mailbox-Space in a quota-restricted Domain-space should be available to domain admins too, since the current situation is that a domain admin manages a particular domain by himself.

I suppose this is not allowed if iRedMail + iRedAdmin-Pro is running as an email hosting vendor. You may not allow your customer to create unlimited quota.

I'm afraid that this seems too complicate and it conflicts with some use cases, we have no plan to implement it shortly.