feat(stats): count emails forwarded to the catch-all fallback

Adds an emails_forwarded counter (a subset of emails_rejected) bumped on a
successful FALLBACK_FORWARD_ADDRESS forward. Dropped = rejected − forwarded.
Surfaced in the /api/v1/stats response and the public status page.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Julien Herr
2026-05-24 17:19:12 +02:00
parent 1583e95875
commit 81e46c9026
7 changed files with 64 additions and 0 deletions
+1
View File
@@ -138,6 +138,7 @@ export const StatsSchema = z
feeds_deleted: z.number(),
emails_received: z.number(),
emails_rejected: z.number(),
emails_forwarded: z.number(),
unsubscribes_sent: z.number(),
active_feeds: z.number(),
websub_subscriptions_active: z.number(),
+4
View File
@@ -162,6 +162,10 @@ export async function handle(c: Context<{ Bindings: Env }>): Promise<Response> {
value={stats.emails_rejected}
tone="danger"
/>
<Stat
label="Forwarded (catch-all)"
value={stats.emails_forwarded}
/>
<Stat
label="Acceptance rate"
value={acceptanceRate}