[GH-ISSUE #3054] [Feature Request] Quota Warning to user mailbox if user mailbox reaches 90% of allowed space #1745

Open
opened 2026-02-27 11:18:53 +03:00 by kerem · 4 comments
Owner

Originally created by @mas1701 on GitHub (Aug 30, 2023).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/3054

Impacted versions

  • OS Type: any supported
  • OS Version: any supported
  • Database Type: any supported
  • Database version: any supported
  • Modoboa: 1.17.0 or newer
  • installer used: N/A
  • Webserver: any supported

Steps to reproduce

Current behavior

Users using MS Outlook. Unfortunately, Outlook does not show mailbox quotas or quota warnings, except for MS Exchange mailboxes. Deliberately, I'd guess. Therefore, users IMAP mailboxes fill up to the point where no new mail can be delivered.

Recommending users to switch to another e-mail client like Thunderbird is no solution in a business environment where a lot of computers would be affected by this change. With cursing IT admins pushing for Microsoft 365 instead, despite GDPR problems.

Expected behavior

While this is not Modoboa's fault at all, I'd suggest a way to send automatic warnings to users consuming more than 80%, 90% oder 95% of their quota or having less than 50 MB / 100 MB free, whichever is reached first.

Possible solution

A warning plugin that sends quota warnings on a per-mailbox level to affected users in danger of quota overrun. Customizable text preferred.

As an intermediate solution, a quick-and-dirty hack would be acceptable.

Originally created by @mas1701 on GitHub (Aug 30, 2023). Original GitHub issue: https://github.com/modoboa/modoboa/issues/3054 # Impacted versions * OS Type: any supported * OS Version: any supported * Database Type: any supported * Database version: any supported * Modoboa: 1.17.0 or newer * installer used: N/A * Webserver: any supported # Steps to reproduce # Current behavior Users using MS Outlook. Unfortunately, Outlook does not show mailbox quotas or quota warnings, except for MS Exchange mailboxes. Deliberately, I'd guess. Therefore, users IMAP mailboxes fill up to the point where no new mail can be delivered. Recommending users to switch to another e-mail client like Thunderbird is no solution in a business environment where a lot of computers would be affected by this change. With cursing IT admins pushing for Microsoft 365 instead, despite GDPR problems. # Expected behavior While this is not Modoboa's fault at all, I'd suggest a way to send automatic warnings to users consuming more than 80%, 90% oder 95% of their quota or having less than 50 MB / 100 MB free, whichever is reached first. # Possible solution A warning plugin that sends quota warnings on a per-mailbox level to affected users in danger of quota overrun. Customizable text preferred. As an intermediate solution, a quick-and-dirty hack would be acceptable.
Author
Owner

@tonioo commented on GitHub (Aug 31, 2023):

@mas1701 Have you checked https://doc.dovecot.org/configuration_manual/quota/#quota-warning-scripts ?

<!-- gh-comment-id:1700497907 --> @tonioo commented on GitHub (Aug 31, 2023): @mas1701 Have you checked https://doc.dovecot.org/configuration_manual/quota/#quota-warning-scripts ?
Author
Owner

@mas1701 commented on GitHub (Sep 2, 2023):

@mas1701 Have you checked https://doc.dovecot.org/configuration_manual/quota/#quota-warning-scripts ?

Yes, @tonioo , thanks!

I already noticed this Dovecot-internal feature, but currently, I'm experiencing some trouble getting dovecot-lda to work at all. So far, dovecot-lda has yet to deliver any mail to a user's mailbox, even a simple test does not work. I'm on Debian 10 btw.

I will however check the information you provided, since there seem to be some minor differences here and there. Maybe it helps.

<!-- gh-comment-id:1703961744 --> @mas1701 commented on GitHub (Sep 2, 2023): > @mas1701 Have you checked https://doc.dovecot.org/configuration_manual/quota/#quota-warning-scripts ? Yes, @tonioo , thanks! I already noticed this Dovecot-internal feature, but currently, I'm experiencing some trouble getting dovecot-lda to work at all. So far, dovecot-lda has yet to deliver any mail to a user's mailbox, even a simple test does not work. I'm on Debian 10 btw. I will however check the information you provided, since there seem to be some minor differences here and there. Maybe it helps.
Author
Owner

@mas1701 commented on GitHub (Sep 3, 2023):

Got quota warnings to work now, after fixing some permissions, however there is one strange message:

Sep 3 03:40:36 mailsrv dovecot: lda(E-MAIL-ADDRESS-HERE)<106566>: Error: quota: Failed to get quota resource STORAGE_BYTES for INBOX: quota-dict: dict_lookup(priv/quota/storage) failed: Connection closed (reply took 0.000 secs (0.001 in dict wait, 0.000 in other ioloops, 0.000 in locks)) - copying mail anyway

Although it says "error", not "warning", I'm still getting the correct quota warning mail.

<!-- gh-comment-id:1703984861 --> @mas1701 commented on GitHub (Sep 3, 2023): Got quota warnings to work now, after fixing some permissions, however there is one strange message: Sep 3 03:40:36 mailsrv dovecot: lda(E-MAIL-ADDRESS-HERE)<106566><yDcCDxTk82RGoAEA7hzUwA>: Error: quota: Failed to get quota resource STORAGE_BYTES for INBOX: quota-dict: dict_lookup(priv/quota/storage) failed: Connection closed (reply took 0.000 secs (0.001 in dict wait, 0.000 in other ioloops, 0.000 in locks)) - copying mail anyway Although it says "error", not "warning", I'm still getting the correct quota warning mail.
Author
Owner

@tonioo commented on GitHub (Oct 23, 2023):

@mas1701 Don't you see anything else interesting in your logs?

<!-- gh-comment-id:1774809523 --> @tonioo commented on GitHub (Oct 23, 2023): @mas1701 Don't you see anything else interesting in your logs?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1745
No description provided.