Vier Punkte aus kontakterreichbarkeit-mx-bounces-2026-09-15.md, ohne Veroeffentlichungssperre: - PlausibleEmailDomain: Domain ohne Endung oder mit Tippfehler-TLD ist ein 422 an der Legacy-API, deterministisch ohne DNS. - email_domain_checks + MailDomainChecker ueber DnsResolver-Schnittstelle (RFC 5321 impliziter MX, RFC 7505 Null MX, Unresolved ist kein Befund), Observer an Company/Contact, Job nach Commit, taeglicher Refresh, mail:check-domains fuer den Bestand. Nie eine Adresssperre aus DNS. - Admin > Reports > Einlieferer-Bericht: tote Adressen aus Sperrliste und Domainbefund, automatisch abgelehnte Meldungen mit Grund, Text zum Kopieren und CSV. Versendet nichts. - EmailBounceKind::Policy: 5.7.x wird protokolliert, zaehlt aber nicht auf den Schwellwert. Statuscode entscheidet vor Diagnosetext. Messung vorab: 6 von 877 API-Domains ohne Zustellweg, eine davon fuer 66 der 151 Ruecklaeufer verantwortlich. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
57 lines
1.4 KiB
PHP
57 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\EmailDomainState;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
/**
|
|
* Gespeicherter DNS-Befund einer E-Mail-Domain (Kontakterreichbarkeit).
|
|
*
|
|
* @property string $domain
|
|
* @property EmailDomainState $state
|
|
* @property string|null $detail
|
|
* @property int $attempts
|
|
* @property Carbon|null $checked_at
|
|
* @property Carbon|null $expires_at
|
|
* @property Carbon|null $first_broken_at
|
|
*/
|
|
class EmailDomainCheck extends Model
|
|
{
|
|
protected $guarded = [];
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'state' => EmailDomainState::class,
|
|
'checked_at' => 'datetime',
|
|
'expires_at' => 'datetime',
|
|
'first_broken_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function isFresh(): bool
|
|
{
|
|
return $this->expires_at !== null && $this->expires_at->isFuture();
|
|
}
|
|
|
|
/**
|
|
* Nachweislich unzustellbare Domains — ohne „Prüfung offen".
|
|
*
|
|
* @param Builder<EmailDomainCheck> $query
|
|
*/
|
|
public function scopeBroken(Builder $query): void
|
|
{
|
|
$query->whereIn('state', [
|
|
EmailDomainState::NullMx->value,
|
|
EmailDomainState::NoMailPath->value,
|
|
EmailDomainState::DomainMissing->value,
|
|
EmailDomainState::BrokenMx->value,
|
|
]);
|
|
}
|
|
}
|