diff --git a/src/agents/smtp/smtpc.c b/src/agents/smtp/smtpc.c index a35d892..4974632 100755 --- a/src/agents/smtp/smtpc.c +++ b/src/agents/smtp/smtpc.c @@ -39,6 +39,8 @@ #include "mailauth.h" #include "smtpc.h" + +#define SMTP_OUTBOUND_WORKER_STACK_SIZE (512 * 1024) #include "capabilities.h" #include "protocol.h" #include "proxy.h" @@ -1965,7 +1967,15 @@ SMTPAgentServer(void *ignored) /* Listen for incoming queue items. Call ProcessEntry with a * SMTPAgentClient allocated for each incoming queue entry. */ - SMTPAgent.OutgoingThreadPool = BongoThreadPoolNew(AGENT_NAME " Clients", BONGO_QUEUE_AGENT_DEFAULT_STACK_SIZE, 0, 1, minSleep); + /* + * DNSSEC validation in libunbound and TLS policy processing require + * substantially more stack than the legacy queue-agent default. The + * XPL pthread wrapper doubles the requested value, yielding a 1 MiB + * stack while retaining a guard page for this SMTP delivery worker. + */ + SMTPAgent.OutgoingThreadPool = BongoThreadPoolNew( + AGENT_NAME " Clients", SMTP_OUTBOUND_WORKER_STACK_SIZE, + 0, 1, minSleep); //SMTPAgent.OutgoingThreadPool = BongoThreadPoolNew(AGENT_NAME " Clients", BONGO_QUEUE_AGENT_DEFAULT_STACK_SIZE, minThreads, maxThreads, minSleep); SMTPAgent.nmapOutgoing = BongoQueueConnectionInit(&SMTPAgent.agent, Q_OUTGOING); BongoQueueAgentListenWithClientPool(&SMTPAgent.agent,