Commit 5c609d6
Tobias Weiß
fix: correct rate limiting interval calculation in UIxMailEditor
The rate limiting check was using messageSubmissionBlockInterval (block duration)
instead of maximumSubmissionInterval (rate limit window) to determine if
message submission should be blocked.
Configuration example:
SOGoMaximumMessageSubmissionCount: 5 messages
SOGoMaximumRecipientCount: 100 recipients
SOGoMaximumSubmissionInterval: 30 seconds (rate limit window)
SOGoMessageSubmissionBlockInterval: 300 seconds (how long to block after violation)
Previous incorrect behavior:
Code checked: delta <= block_time (<= 300s)
Result: 5th message blocked even if sent AFTER 30s had elapsed
Correct behavior now:
Code checks: delta < maximumSubmissionInterval (< 30s)
Result: Only blocks if 5 messages sent WITHIN the 30s window
This also simplifies the counter reset logic - reset when the submission
interval has elapsed AND we're within limits.1 parent 5e1e5a8 commit 5c609d6
1 file changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
878 | 882 | | |
879 | | - | |
| 883 | + | |
880 | 884 | | |
881 | 885 | | |
882 | 886 | | |
| |||
887 | 891 | | |
888 | 892 | | |
889 | 893 | | |
890 | | - | |
891 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
892 | 900 | | |
893 | 901 | | |
894 | 902 | | |
| |||
0 commit comments