Vishnu Narayanan
|
c884cdefde
|
feat: add per-account daily rate limit for outbound emails (#13411)
Introduce a daily cap on non-channel outbound emails to prevent abuse.
Fixes https://linear.app/chatwoot/issue/CW-6418/ses-incident-jan-28
## Type of change
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
## Summary
- Adds a Redis-based daily counter to rate limit outbound emails per
account, preventing email abuse
- Covers continuity emails (WebWidget/API), conversation transcripts,
and agent notifications
- Email channel replies are excluded (paid feature, not abusable)
- Adds account suspension check in `ConversationReplyMailer` to block
already-queued emails for suspended accounts
## Limit Resolution Hierarchy
1. Per-account override (`account.limits['emails']`) — SuperAdmin
configurable
2. Enterprise plan-based (`ACCOUNT_EMAILS_PLAN_LIMITS`
InstallationConfig)
3. Global default (`ACCOUNT_EMAILS_LIMIT` InstallationConfig, default:
100)
4. Fallback (`ChatwootApp.max_limit` — effectively unlimited)
## Enforcement Points
| Path | Where | Behavior |
|------|-------|----------|
| WebWidget/API continuity |
`SendEmailNotificationService#should_send_email_notification?` |
Silently skipped |
| Widget transcript | `Widget::ConversationsController#transcript` |
Returns 429 |
| API transcript | `ConversationsController#transcript` | Returns 429 |
| Agent notifications | `Notification::EmailNotificationService#perform`
| Silently skipped |
| Email channel replies | Not rate limited | Paid feature |
| Suspended accounts | `ConversationReplyMailer` | Blocked at mailer
level |
|
2026-02-03 02:06:51 +05:30 |
|
Sojan Jose
|
e97489f534
|
chore: Disable email notifications for unconfirmed users (#10964)
- disable email notifications if the user hasn't confirmed the email yet, as there is potential chance for the emails to bounce
|
2025-02-24 12:14:40 -08:00 |
|
Muhsin Keloth
|
6b0d1d77d3
|
fix: Email notifications (#8502)
|
2023-12-06 15:50:23 +05:30 |
|
Sojan Jose
|
a04ca24def
|
feat: Customisable Email Templates (#1095)
|
2020-08-06 15:21:06 +05:30 |
|
Pranav Raj S
|
e9131ea558
|
Feature: Add web push notification permission in frontend (#766)
Add webpush notification permission in frontend
Co-authored-by: Sojan <sojan@pepalo.com>
|
2020-05-06 00:10:56 +05:30 |
|
Sojan Jose
|
96da27f1f6
|
Feature: User Notification Objects (#752)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
|
2020-05-01 14:53:43 +05:30 |
|