From 43bc6d1e8724780d93c4986ec90f8b371c6c64ae Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sun, 26 Jul 2026 16:48:04 +0200 Subject: [PATCH] Retry queued mail when SMTP becomes ready --- src/agents/queue/queue.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/agents/queue/queue.c b/src/agents/queue/queue.c index c3f51b6..be725c9 100644 --- a/src/agents/queue/queue.c +++ b/src/agents/queue/queue.c @@ -609,11 +609,13 @@ AddPushAgent(QueueClient *client, XplMutexUnlock(Queue.PushClients.lock); /* Queue entries can reach the outgoing queue while the agents are still - * registering during startup. Wake the monitor as soon as the SMTP - * delivery agent is available instead of leaving those entries behind - * until the normal remote-delivery retry interval expires. */ + * registering during startup. A normal monitor restart deliberately + * skips young outgoing entries to avoid a tight delivery retry loop, so + * merely waking it is not sufficient here. Treat a newly available SMTP + * agent like an explicit flush: retry persisted entries immediately once, + * after which failed deliveries return to the normal retry interval. */ if (queue == Q_OUTGOING) { - Queue.restartNeeded = TRUE; + Queue.flushNeeded = TRUE; } return 0; }