1

Topic: Quota not working

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

Somewhere along the line quotas stopped working.
The iredadmin pro interface does not update the mailbox size when emails are sent.
I set up one test account with a quota of 100MB. It had about 95MB in the mailbox. I sent a couple of mails (both from internal and external accounts) with 10MB attachments, both were accepted, and the new mailbox size is not shown in the iredamin interface. If I run a command line "doveadm quota recalc -A" the sizes are updated.

So, my two issues are that mail is being accepted and no quota warning messages are being sent if the account is near or over quota, and that mailbox sizes are not being updated correctly in the iradadmin pro interface.

----

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

2

Re: Quota not working

iRedAdmin-Pro reads the mailbox quota usage from a SQL table which is updated by Dovecot, if "doveadm quota recalc" works, iRedAdmin-Pro should get the correct quota info.

The problem is, when you sent the testing email, did you check the Dovecot log file to understand what actually happened? Was email rejected or delivered?

3

Re: Quota not working

As I had said, the emails were accepted and delivered to the inbox.

In the iRedAdmin interface:
testuser@example.com            
100% (158 MB/100 MB)

dovecot log:
Feb  4 08:19:20 mail postfix/10025/smtpd[539]: 800666BA00B2: client=localhost[127.0.0.1]
Feb  4 08:19:20 mail postfix/cleanup[29335]: 800666BA00B2: message-id=<CACt5q-8ATNOywVEcKtbdxKgfNdFXYErvWgng2zZ-HVnyOE9tRA@mail.gmail.com>
Feb  4 08:19:20 mail postfix/qmgr[7664]: 800666BA00B2: from=<externalaccount@gmail.com>, size=3643, nrcpt=1 (queue active)
Feb  4 08:19:20 mail postfix/amavis/smtp[29343]: C39866B527F7: to=<testuser@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.8, delays=0.07/0/0/1.7, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 800666BA00B2)
Feb  4 08:19:20 mail postfix/pipe[29279]: 800666BA00B2: to=<testuser@example.com>, relay=dovecot, delay=0.05, delays=0.01/0.01/0/0.02, dsn=2.0.0, status=sent (delivered via dovecot service)
Feb  4 08:19:20 mail postfix/qmgr[7664]: 800666BA00B2: removed

I can send a message of any size to that account, it is accepted, but the mailbox size in the iRedAdmin panel does not update unless I force a quota recalc.

In the above example the quota shows over by 58MB (158MB with  a 100MB quota). If I send a 10MB file to the account it is accepted, delivered, and the mailbox size still shows as 158MB.

No warning emails are sent either to the user or the admin when an account approaches or goes over the quota.

4

Re: Quota not working

Try this:

- Please show us output of command below:

ls -l /etc/dovecot/dovecot-used-quota.conf

- Please open file dovecot-used-quota.conf and make sure the SQL username and password are correct.
- Please enable debug mode in Dovecot[1], reproduce the issue again, and check all logs relevant to this testing email in dovecot log files under /var/log/dovecot/. If there's something wrong, i expect Dovecot to log some info for troubleshooting.

[1] Debug Dovecot: https://docs.iredmail.org/debug.dovecot.html