Mail quotum not honored

quota
ns6upgrade
v7
mail

(Jaap van der Veen) #1

NethServer Version: 7.3.1611
Module: Email

All users on my NethServer mailserver have a mail quotum of 10GB with one exception, this user can use Unlimited space.

In Status | Mail quota all users (also the user that should have Unlimited) have a Max. size of 10GB.

The column Usage percentage displays 180% for the Unlimited user.

Management | Email adresses correctly shows Unlimited in thew column Custom mail quota for the Unlimited user.


So first of all the mail quota are not displayed correctly in the Server Manager GUI.

But, second, the mail quotum that is actually used for the unlimited user is 10GB, generating error messages and refusals to move mail messages to folders because the user is using too much space.

(I have tried setting the mail quotum to 30GB in stead of Unlimited, no effect)


(Davide Principi) #2

We had a couple of bug fixes around mail quota in the past months. From what you say it seems they are here to beat us again!

Can you reproduce the same problem for another user too? Could you write down the procedure to reproduce this issue?

More details about your installation:

Is it an upgraded/migrated system?
What is the accounts provider type?
Any log evidence in /var/log/messages imap maillog?

See also


(Jaap van der Veen) #3

Is it an upgraded/migrated system?

Upgraded.

What is the accounts provider type?

Local LDAP

Any log evidence in /var/log/messages imap maillog?

In /var/log/messages I found these warnings:

Jun 16 08:25:33 customer-213-233-226-123 esmith::event[28492]: WARNING in /etc/e-smith/templates//etc/dovecot/quota.passwd/10base: Argument "unlimited" isn't numeric in left bitshift (<<) at /etc/e-smith/templates//etc/dovecot/quota.passwd/10base line 16.

Jun 16 08:25:33 customer-213-233-226-123 esmith::event[28492]: WARNING: Template processing succeeded for //etc/dovecot/quota.passwd: 1 fragment generated warnings

Before reading your reply I already increased the quota for all users to 30GB; works!

Adjusting the quotum for the one user to 45GB; works!

Adjusting the quotum for a second user to 45GB; works!

Setting the default quotum back to 10GB; works! The quotum of 45GB for the two users is honored.

Setting the quotum for the first user at Unlimited; works!

Resetting the quotum for the second user to the default; works!


(Davide Principi) #4

Well, I cannot reproduce the problem on a clean installation. What I did

  • install nethserver-mail-server and local LDAP accounts provider
  • create “first.user” and set password
  • set admin’s quota to unlimited
  • enable global quota default 100MB
  • set first.user quota to unlimited
  • sent a couple of messages to both of them

Both users have unlimited quota, according to doveadm quota command.

[root@vm8 ~]# doveadm quota get -u first.user@dpnet.nethesis.it
Quota name Type    Value Limit                                     %
Quota      STORAGE     1     -                                     0
Quota      MESSAGE     2     -                                     0
[root@vm8 ~]# doveadm quota get -u admin@dpnet.nethesis.it
Quota name Type    Value Limit                                     %
Quota      STORAGE     1     -                                     0
Quota      MESSAGE     2     -                                     0

Despite the warning message, the “unlimited” string value is correctly casted to integer “0”, that means “unlimited”. It’s an ugly way of coding, but does the job.

An upgraded system means pre-existing mailboxes and data. The upgrade procedure runs nethserver-mail-server-update event, which does not invoke the nethserver-mail-quota-recalc action… It should not be required, though… :thinking:

The fact that you fixed the issue by invoking nethserver-mail-server-save event makes me think nethserver-mail-quota-recalc is actually required during the upgrade procedure!


Edit:

One more question: did you notice if the Mail quota page listed accounts with @domain suffix? Did the upgrade procedure failed some step?


(Jaap van der Veen) #5

Too soon!

I just received the followed message in my mail client:

Het IMAP-commando ''UID COPY' (doel: Nieuwsbrieven)' is mislukt voor de postbus 'INBOX' met serverfout: Quota exceeded (mailbox for user is full).

The IMAP command UID COPY (target: Niewsbrieven - mail folder) failed voor the mailbox INBOX with the server error: Quota exceeded (mailbox for user is full).

And indeed Mail quota shows the 180% usage percentage again while Email addresses shows Unlimited.

I have set the mail quotum for this user 45GB for now, we’ll see what happens.

Lines from /var/log/messages:
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: NEW jaapvdv@solcon.nl=user
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: OLD jaapvdv@solcon.nl=user
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: NEW jaapvdv@solcon.nl=user|MailAccess|public
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: OLD jaapvdv@solcon.nl=user|MailAccess|public
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: NEW jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress|
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: OLD jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress|
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: NEW jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: OLD jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: NEW jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: OLD jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: NEW jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled|MailQuotaCustom|450
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: OLD jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled|MailQuotaCustom|450
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: NEW jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled|MailQuotaCustom|450|MailQuotaType|custom
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: OLD jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled|MailQuotaCustom|450|MailQuotaType|custom
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: NEW jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled|MailQuotaCustom|450|MailQuotaType|custom|MailSpamRetentionStatus|disabled
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: OLD jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled|MailQuotaCustom|450|MailQuotaType|custom|MailSpamRetentionStatus|disabled
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: NEW jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled|MailQuotaCustom|450|MailQuotaType|custom|MailSpamRetentionStatus|disabled|MailSpamRetentionTime|180d
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: OLD jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled|MailQuotaCustom|450|MailQuotaType|custom|MailSpamRetentionStatus|disabled|MailSpamRetentionTime|180d
Jun 16 10:12:10 customer-213-233-226-123 /sbin/e-smith/db[2471]: /var/lib/nethserver/db/accounts: NEW jaapvdv@solcon.nl=user|MailAccess|public|MailForwardAddress||MailForwardKeepMessageCopy|no|MailForwardStatus|disabled|MailQuotaCustom|450|MailQuotaType|custom|MailSpamRetentionStatus|disabled|MailSpamRetentionTime|180d|MailStatus|enabled
Jun 16 10:12:10 customer-213-233-226-123 esmith::event[2474]: Event: mailbox-save jaapvdv@solcon.nl
Jun 16 10:12:10 customer-213-233-226-123 esmith::event[2474]: expanding /etc/dovecot/deny.passwd
Jun 16 10:12:10 customer-213-233-226-123 dbus[630]: [system] Activating via systemd: service name=‘org.freedesktop.timedate1’ unit='dbus-org.freedesktop.timedate1.service’
Jun 16 10:12:10 customer-213-233-226-123 dbus-daemon: dbus[630]: [system] Activating via systemd: service name=‘org.freedesktop.timedate1’ unit='dbus-org.freedesktop.timedate1.service’
Jun 16 10:12:10 customer-213-233-226-123 systemd: Starting Time & Date Service…
Jun 16 10:12:10 customer-213-233-226-123 dbus[630]: [system] Successfully activated service 'org.freedesktop.timedate1’
Jun 16 10:12:10 customer-213-233-226-123 dbus-daemon: dbus[630]: [system] Successfully activated service 'org.freedesktop.timedate1’
Jun 16 10:12:10 customer-213-233-226-123 systemd: Started Time & Date Service.
Jun 16 10:12:10 customer-213-233-226-123 esmith::event[2474]: expanding /etc/dovecot/quota.passwd
Jun 16 10:12:10 customer-213-233-226-123 esmith::event[2474]: expanding /etc/postfix/internal_access
Jun 16 10:12:10 customer-213-233-226-123 esmith::event[2474]: expanding /etc/postfix/virtual
Jun 16 10:12:10 customer-213-233-226-123 esmith::event[2474]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.295257]
Jun 16 10:12:13 customer-213-233-226-123 esmith::event[2474]: Action: /etc/e-smith/events/mailbox-save/S30nethserver-mail-postmap-update SUCCESS [2.85077]
Jun 16 10:12:13 customer-213-233-226-123 systemd: Reloading.
Jun 16 10:12:14 customer-213-233-226-123 esmith::event[2474]: [INFO] service dovecot reload
Jun 16 10:12:14 customer-213-233-226-123 systemd: Reloaded Dovecot IMAP/POP3 email server.
Jun 16 10:12:14 customer-213-233-226-123 esmith::event[2474]: [INFO] dovecot reload
Jun 16 10:12:14 customer-213-233-226-123 esmith::event[2474]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.469615]
Jun 16 10:12:14 customer-213-233-226-123 esmith::event[2474]: Action: /etc/e-smith/events/mailbox-save/S95nethserver-mail-quota-recalc SUCCESS [0.094565]
Jun 16 10:12:14 customer-213-233-226-123 esmith::event[2474]: Event: mailbox-save SUCCESS
Jun 16 10:13:53 customer-213-233-226-123 clamd: SelfCheck: Database status OK.


(Jaap van der Veen) #6

Nope, does not work resets again to 10GB, no additional lines in /var/log/messages maillog map though.

Will set quota to 30GB for all users again and see if that sticks.


(Jaap van der Veen) #7

That seems to work, currently the quotum for the user is set at 45GB but that is not visible in Mail quota.


(Jaap van der Veen) #8

Actually it does yes.

One of them is netserver-directory-update


(Davide Principi) #9

2 posts were split to a new topic: Inconsistent mail quota value


(Jaap van der Veen) #10

Well, I am still running 6.9. Have mot recentst tried the upgrade.
I do have an up to date NethServer 7.4 VM prepared with the data migrated, just not the last step.
When I will do that, I will post the results here.


(Jaap van der Veen) #11

I am currently in the middle of migrating my Nethserver 6.9 (with SoGo 3) mailserver to Nethserver 7.4 (with SoGo4).

After giving the ‘screen rsync-upgrade’ method an other try, which failed, I decided to put my Imapsync license to good use (again).

While writing this message, imapsync is copying the mailboxes on my Nethserver 6.9 VM to a new Nethserver7.4 VM.


(Alessio Fattorini) #12

How was it going? Keep us in touch