Issue Description
Stalwart 1.0.3 (8b32686). The docs (mta/outbound/connection.md) describe dataTimeout as “Reply after the message data”, default 10 minutes. The wait for that reply actually uses rcptToTimeout.
Expected Behavior
As documented, dataTimeout covers the reply after the message data; or the docs say that rcptToTimeout does.
Actual Behavior
Test, 1 run: the receiver takes the message and stalls 150 s after the final dot, then answers 250.
rcptToTimeout |
dataTimeout |
Result | Receiver got it |
|---|---|---|---|
| 60 s | 300 s | Dropped at 60,186 ms, “Timeout while reading SMTP DATA response”, retried | Twice |
| 300 s | 60 s | Waited, delivered | Once |
Reproduction Steps
- A receiving server that reads the message and stalls 150 s after the final dot before answering 250.
MtaConnectionStrategy:rcptToTimeout60 s,dataTimeout300 s.ReloadSettings. Send one message: dropped at 60 s, sent again on retry.rcptToTimeout300 s,dataTimeout60 s.ReloadSettings. Send one message: waits, delivered once.
Relevant Log Output
2026-11-05T07:00:56Z INFO Message rejected by remote server (delivery.message-rejected) queueName = "remote", size = 231, total = 1, causedBy = SMTP error occurred (smtp.error) { details = "Connection Error", reason = "Timeout while reading SMTP DATA response" }, elapsed = 60186ms
Some fields removed: addresses, hostname, queue ID.
Stalwart Version
v1.x
Installation Method
Binary (Linux)
Database Backend
PostgreSQL
Blob Storage
S3-compatible
Search Engine
PostgreSQL
Directory Backend
Internal
Additional Context
Read in source: read_smtp_data_response uses self.timeout (crates/smtp/src/outbound/client.rs:139-146), last set to timeout_rcpt at session.rs:191. timeout_data wraps only DATA, the 354 and writing the body (client.rs:224).
So lowering the RCPT timeout, which looks harmless, causes duplicates with receivers that scan after DATA, and raising dataTimeout doesn’t help. Is this intended? If not, could that reply use dataTimeout? If it is, could the docs say so?
Tested and written with AI help.
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on