✨ Introduce configurable sending quotas#955
Conversation
|
|
||
| smtp_quota_limit_per_minute: | ||
| type: integer | ||
| default: 0 |
There was a problem hiding this comment.
Maybe we want to define some sensible defaults?
There was a problem hiding this comment.
I believe these limits to be highly environment-dependent, I've no idea what these limits could be. Leaving them at "unlimited" seems okay to me; people need to set these limits themselves, if they want to rely on this feature.
Looking around, mailbox.org allows 10000 mails per day; posteo.de limits to 500 mails per hour and 1000 mails per day.
To ease adoption of this feature, we could think about an option to specifiy the action to take if a user breaches the limit. For example, to get started, while still figuring out which limits to use, it might be preferable to relax enforcement, i.e. "report / log", instead of "enforce". Not relly happy regarding these names, thats just a rough draft to describe the idea.
| ->add('passwordChangeRequired', CheckboxType::class, [ | ||
| ]); | ||
|
|
||
| if ($this->security->isGranted(Roles::ADMIN)) { |
There was a problem hiding this comment.
Only admins can set that per user, domain admins will not see that setting
2bd2b11 to
b14d0c7
Compare
|
3432120 to
acded3a
Compare
nevart
left a comment
There was a problem hiding this comment.
I can't comment on the code itself, just added some general thoughts. Thanks so much for pushing this!
| ->add('passwordChangeRequired', CheckboxType::class, [ | ||
| ]); | ||
|
|
||
| if ($this->security->isGranted(Roles::ADMIN)) { |
|
|
||
| smtp_quota_limit_per_minute: | ||
| type: integer | ||
| default: 0 |
There was a problem hiding this comment.
I believe these limits to be highly environment-dependent, I've no idea what these limits could be. Leaving them at "unlimited" seems okay to me; people need to set these limits themselves, if they want to rely on this feature.
Looking around, mailbox.org allows 10000 mails per day; posteo.de limits to 500 mails per hour and 1000 mails per day.
To ease adoption of this feature, we could think about an option to specifiy the action to take if a user breaches the limit. For example, to get started, while still figuring out which limits to use, it might be preferable to relax enforcement, i.e. "report / log", instead of "enforce". Not relly happy regarding these names, thats just a rough draft to describe the idea.
|
I thought about if it makes sense, to introduce If new accounts are onboarded, which need extended limits, admins could just switch the role, instead of thinking specifically if the new limits should be 1000 or 2000. |
|
Another thought: it might make sense to enable users to configure email addresses, to which mails sent wouldn't be counted against the SMTP quota. Having this in place might enable people to reach the provider, even if over quota, if there is a need, for example because they started to send many mails for good reasons, but now would like to ask for increased limits. Edit: I'm not sure if Userli actually knows about the destination of messages, probably not, so if true, the above isn't for Userli. |
acded3a to
98d182b
Compare
98d182b to
dc03408
Compare
|



This pull request introduces configurable SMTP quota limits at both the global (settings), user, and alias levels, allowing administrators to restrict the number of emails sent per hour and per day. It adds support for these limits in the backend, exposes them via a new API endpoint, and updates the admin UI and translations accordingly. Comprehensive tests are included to ensure correct behavior.
SMTP Quota Limit Functionality
smtp_quota_limit_per_hourandsmtp_quota_limit_per_day, including validation and display in the settings UI. [1] [2] [3]UserandAliasentities to support custom SMTP quota limits, with corresponding getter/setter methods and database mapping. [1] [2] [3] [4]SmtpQuotaLimitsTypefor editing quota limits, and integrated it into the admin forms for users and aliases. [1] [2] [3] [4] [5]API and Backend Enhancements
/api/postfix/quota/{email}to retrieve the effective SMTP quota limits for a user or alias, defaulting to global settings if no custom limits are set. [1] [2] [3]