mailcow-dockerized icon indicating copy to clipboard operation
mailcow-dockerized copied to clipboard

Limit quota notifications to once per-user, per-day.

Open SnailShea opened this issue 1 year ago • 3 comments

This commit uses datetime ordinal dates to create timestamps for comparison. If a quota notification email is sent, another will not be sent within the same day. I created this change due to some users receiving as many as 20 emails within one minute when their inbox begins to fill.

It may be desirable to have more granular control over quota notification frequency. Ordinal dates were chosen because they make the time math much simpler, but are not useful checking any timestamp difference of less than 1 day. If desired, I can add additional commits to make the limitation configurable via the web UI.

Testing was done by running a bash shell inside the dovecot container and manually invoking the script.

SnailShea avatar Jul 13 '23 15:07 SnailShea

Code looks good, but i couldn't replicate the issue with the frequent notifications. So maybe let this option be configurable via web UI for each mailbox like this? image

FreddleSpl0it avatar Sep 08 '23 13:09 FreddleSpl0it

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

milkmaker avatar Nov 07 '23 13:11 milkmaker

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

milkmaker avatar Jan 07 '24 00:01 milkmaker

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

milkmaker avatar Apr 09 '24 20:04 milkmaker