1

Topic: Domain based quota

======== Required information ====
- iRedMail version: 0.8.7
- iRedAdmin-Pro-LDAP version 2.1.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: CentOS 6.5
- Related log if you're reporting an issue:
====

Dear iRedAdmin-Pro Support,

we would like to set a per domain quota. Single account quota could be unlimited.
Something like: http://www.yalo.net/notabene/linux/dove … quota.html but since we use LDAP backend, we cannot use the solution as desccribed in the link.
Is there a known or tested dovecot configuration that we could use?

Regards,

Andrea
.a.c.

----

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

2

Re: Domain based quota

Excuse me, what do you mean we cannot use the solution with LDAP backend? Did you try it? Any error/issue?

iRedMail stores per-user real-time quota in SQL database by default.

3

Re: Domain based quota

Hi Zang

ZhangHuangbin wrote:

Excuse me, what do you mean we cannot use the solution with LDAP backend? Did you try it? Any error/issue?

iRedMail stores per-user real-time quota in SQL database by default.

Yes we know, but the point is the following:
In the Dovecot configuration with LDAP backend, the quota is retrieved from the mailQuota attribute into the quota_rule variable using:

user_attrs      = mail=user,homeDirectory=home,=mail=maildir:~/Maildir/,mailQuota=quota_rule=*:bytes=%$,=master_user=%u

As far as we understand, this is a "user quota", and not a "domain quota".
The first question is: how can we modify this in order to retrieve the "domain quota" without impacting the other needed variables?

Moreover, the actual quota is then retrieved from mysql according to the specified dictionary:

quotadict = mysql:/etc/dovecot/dovecot-used-quota.conf

Inside the above dovecot-used-quota.conf file we can only see some mapping definitions and the mysql connection parameters.
The second question is: where are the actual mysql queries specified? Is there the possibility to get domain information instead of user information from the mysql db?

Thank you very much.

Kind Regards
Riccardo

4

Re: Domain based quota

Hi Riccardo, Sorry about my misunderstanding.

With LDAP backend, domain quota is stored in domain object (domainName=xxx,o=domains,dc=xx,dc=xx), so you cannot get domain quota in LDAP filter used to query per-user settings (quota, maildir path, etc).

I'm sorry i have no idea yet. But maybe we can write an iRedAPD plugin to achieve this. For example:

1) Get domain quota from domain object.
2) Get current per-user quota usages from real-time SQL quota dict.

Your opinion?