Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(messaging): add hard_bounced_at to the email suppression list (#124637)

Meikel Ratz1d3ead46083f
diff --git a/products/messaging/backend/migrations/0011_messagesuppression_hard_bounced_at.py b/products/messaging/backend/migrations/0011_messagesuppression_hard_bounced_at.py
new file mode 100644
index 000000000000..395acab75bd9
--- /dev/null
+++ b/products/messaging/backend/migrations/0011_messagesuppression_hard_bounced_at.py
@@ -0,0 +1,17 @@
+# Generated by Django 5.2.18 on 2026-10-28 08:28
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("messaging", "0010_supabase_auth_email_config"),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name="messagesuppression",
+ name="hard_bounced_at",
+ field=models.DateTimeField(blank=True, null=True),
+ ),
+ ]
diff --git a/products/messaging/backend/migrations/max_migration.txt b/products/messaging/backend/migrations/max_migration.txt
index 3512088bfe35..83e9b0609d9c 100644
--- a/products/messaging/backend/migrations/max_migration.txt
+++ b/products/messaging/backend/migrations/max_migration.txt
@@ -1 +1 @@
-0010_supabase_auth_email_config
+0011_messagesuppression_hard_bounced_at
diff --git a/products/messaging/backend/models/message_suppression.py b/products/messaging/backend/models/message_suppression.py
index 18765cafa2ea..89cbe3f29ad7 100644
--- a/products/messaging/backend/models/message_suppression.py
+++ b/products/messaging/backend/models/message_suppression.py
@@ -58,6 +58,9 @@ class MessageSuppression(TeamScopedRootMixin, UUIDModel):
last_bounce_at = models.DateTimeField(null=True, blank=True)
# Last SMTP diagnostic we saw, kept for visibility in the UI (e.g. the "Message expired" text).
last_bounce_diagnostic = models.TextField(null=True, blank=True)
+ # When the address last hard-bounced. Set on every row, manual entries included, and cleared when a
+ # user removes the suppression. A suppressed row with this set also blocks transactional messages.
+ hard_bounced_at = models.DateTimeField(null=True, blank=True)
# Whether the address is actively suppressed. A row can exist while still only counting
# bounces (suppressed=False) before it crosses the threshold.