mail: zentrale Bounce-Suppression mit Versand-Gate und Circuit Breaker (Roadmap 1b.6, Schritte 1–2)
email_suppressions/email_bounces als Zustand und Ereignis-Log; ein MessageSending-Listener streicht gesperrte Empfänger aus JEDER ausgehenden Mail und setzt den Return-Path. Zweiter Aufnahmepfad: SMTP-Ablehnungen im Worker — 5.1.x sperrt den Empfänger, Relay-Ablehnungen zählen für den Circuit Breaker, der den Versand anhält statt gesunde Adressen zu sperren. X-Pk-Ref-Header auf den Mails, API-Meldungen fallen auf die Firmen-E-Mail zurück, der Bounce-Import schreibt in die zentrale Liste. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
85b039e739
commit
8bf40ee37e
25 changed files with 1312 additions and 4 deletions
28
app/Enums/EmailBounceKind.php
Normal file
28
app/Enums/EmailBounceKind.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
/**
|
||||
* Art eines Rückläufers. Maßgeblich ist bei DSNs `Action`, nicht der
|
||||
* Statuscode allein (Konzept `bounce-mails-2026-09-15.md`).
|
||||
*/
|
||||
enum EmailBounceKind: string
|
||||
{
|
||||
/** `Action: failed`, Status 5.x.x — Postfach existiert nicht, sofort sperren */
|
||||
case Hard = 'hard';
|
||||
|
||||
/** `Action: delayed` oder Status 4.x.x — zählen, ab dem dritten in sieben Tagen sperren */
|
||||
case Soft = 'soft';
|
||||
|
||||
/** Relay lehnt UNS ab (5.7.x, 554 Spam-Pattern, Verbindung) — kein Empfängerproblem, Circuit Breaker */
|
||||
case Relay = 'relay';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Hard => 'hart',
|
||||
self::Soft => 'weich',
|
||||
self::Relay => 'Relay',
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue