Issue Description
When receiving an email to an alias defined in Windows AD the email is rejected with “Relay not allowed”
Expected Behavior
Email should be accepted and delivered to recepient address.
Actual Behavior
Email is rejected with Relay not allowed
Reproduction Steps
- Stalwart was working in 0.16.8. Is connected through LDAP to Windows AD. In AD there are defined email addresses and aliases.
Below are the lines from log (Trace level). It is pretty hard to know if I put all the lines reffering to a connection between there is no ID related to a transaction.
The same configration is working fine in 0.16.8
Relevant Log Output
2026-06-17T13:20:38Z TRACE Raw SMTP input received (smtp.raw-input) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, size = 84, contents = “MAIL FROM:[email protected] SIZE=47897\r\nRCPT TO:[email protected]\r\n”
2026-06-17T13:20:39Z INFO IPREV check passed (smtp.iprev-pass) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, domain = “DB3PR0202CU003.outbound.protection.outlook.com”, result = IPREV check passed (iprev.pass) { details = [“mail-northeuropeazon11020142.outbound.protection.outlook.com.”] }, elapsed = 136ms
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageMail with id singleton”, key = “isSenderAllowed”, result = “Integer(1)”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageMail with id singleton”, key = “script”, result = “Integer(0)”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageMail with id singleton”, key = “script”, result = “”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageMail with id singleton”, key = “rewrite”, result = “Integer(0)”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageMail with id singleton”, key = “rewrite”, result = “”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageData with id singleton”, key = “maxMessageSize”, result = “Integer(104857600)”
2026-06-17T13:20:39Z INFO SPF From check passed (smtp.spf-from-pass) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, domain = “DB3PR0202CU003.outbound.protection.outlook.com”, from = “[email protected]”, result = SPF check passed (spf.pass), elapsed = 0ms
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “SpfReportSettings with id singleton”, key = “sendFrequency”, result = “Array([Integer(1), Integer(86400000)])”
2026-06-17T13:20:39Z INFO SMTP MAIL FROM command (smtp.mail-from) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, from = “[email protected]”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageRcpt with id singleton”, key = “maxFailures”, result = “Integer(5)”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageRcpt with id singleton”, key = “waitOnFail”, result = “Integer(5000)”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageRcpt with id singleton”, key = “maxRecipients”, result = “Integer(100)”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaExtensionswith id singleton”, key = “dsn”, result = “Integer(0)”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageData with id singleton”, key = “maxMessageSize”, result = “Integer(104857600)”
2026-06-17T13:20:39Z TRACE Raw SMTP output sent (smtp.raw-output) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, size = 14, contents = “250 2.1.0 OK\r\n”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageRcpt with id singleton”, key = “script”, result = “Integer(0)”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageRcpt with id singleton”, key = “script”, result = “”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageRcpt with id singleton”, key = “rewrite”, result = “Integer(0)”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageRcpt with id singleton”, key = “rewrite”, result = “”
2026-06-17T13:20:39Z DEBUG Cache hit (store.cache-hit) key = “destinationdomain.ro”, collection = “domainNameNegative”
2026-06-17T13:20:39Z TRACE Expression evaluation result (eval.result) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, id = “MtaStageRcpt with id singleton”, key = “allowRelaying”, result = “Integer(0)”
2026-06-17T13:20:39Z INFO Relay not allowed (smtp.relay-not-allowed) listenerId = “smtp”, localPort = 25, remoteIp = 52.101.84.142, remotePort = 39831, to = “[email protected]”
Stalwart Version
v0.16.x
Installation Method
Binary (Linux)
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
LDAP
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