mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 17:43:23 -08:00
* [SMTP] Add reliable email delivery with retry and database-backed queue Rework the SMTP client from fire-and-forget sending into a persistent queue with exponential backoff and per-message retry budget, backed by the existing database rows as the durable source of truth. - Keep pending emails in an in-memory queue with attempts/backoff tracking; enqueue without deleting database rows, and only remove the row once delivery is confirmed via the mailDelivered signal. - Add exponential backoff (doubling, capped at 30 min) between delivery attempts, bounded by new smtp/maxretries and smtp/retrydelay settings. - Track connection-layer failures (connect/auth/encrypt) with their own backoff; route failures to recordFailed/recordConnectionFailure so undeliverable mail eventually drops from the queue instead of retrying forever. - Treat rejected recipients/senders as permanent failures. - Rebuild the SMTP buffer from the authoritative queue before each send via a new QxtSmtp::reset() so reconnects never duplicate deliveries. - Start the idle timeout after authentication, not on TCP connect, so slow SSL/STARTTLS handshakes are not cut short. * [SMTP] Fix retry accounting, backoff reset, and token dedupe --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> |
||
|---|---|---|
| .. | ||
| smtp | ||
| deck_tag_serialization.h | ||
| email_parser.cpp | ||
| email_parser.h | ||
| event_loop_watchdog.cpp | ||
| event_loop_watchdog.h | ||
| isl_interface.cpp | ||
| isl_interface.h | ||
| main.cpp | ||
| main.h | ||
| metrics_registry.cpp | ||
| metrics_registry.h | ||
| servatrice.cpp | ||
| servatrice.h | ||
| servatrice_connection_pool.cpp | ||
| servatrice_connection_pool.h | ||
| servatrice_database_interface.cpp | ||
| servatrice_database_interface.h | ||
| server_logger.cpp | ||
| server_logger.h | ||
| serversocketinterface.cpp | ||
| serversocketinterface.h | ||
| settingscache.cpp | ||
| settingscache.h | ||
| signalhandler.cpp | ||
| signalhandler.h | ||
| smtpclient.cpp | ||
| smtpclient.h | ||