Issue Description
I am trying to use Stalwart’s split delivery feature during a mail migration.
According to the documentation, when a domain has Allow Relaying enabled, messages addressed to recipients that do not exist locally should be accepted and relayed to the configured source server instead of being rejected.
My environment is:
Stalwart Mail Server (latest container image)
Installed with Podman on AlmaLinux
RocksDB backend
Reverse proxy in front of Stalwart
Domain has Allow Relaying enabled
A routing rule is configured to relay unknown recipients for example. com to the source mail server.
The problem is that when an email is sent to a mailbox that does not exist on Stalwart but does exist on the source mail server, Stalwart rejects the recipient during the RCPT TO stage instead of relaying it.
The bounce contains:
550 5.5.0 Mailbox not found
The rejection is generated by Stalwart (host ‘localhost’ rejected command ‘RCPT TO’), and no connection is made to the configured relay destination.
Expected Behavior
When Allow Relaying is enabled for a domain, unknown local recipients should be accepted and forwarded to the configured relay destination, as described in the Split Delivery documentation.
Expected flow:
Recipient is not found locally.
- Stalwart accepts the recipient because relaying is enabled.
- Stalwart connects to the configured remote SMTP server.
- The remote server performs the final recipient lookup and delivers the message.
Actual Behavior
Instead of relaying the message, Stalwart immediately rejects the recipient during the SMTP session with:
550 5.5.0 Mailbox not found
The relay route is never used, and no outbound SMTP connection is attempted.
Reproduction Steps
- Install the latest Stalwart Mail Server using Podman.
- Create a domain such as example. com.
- Enable Allow Relaying for the domain.
- Configure a routing rule that forwards unknown recipients for example. com to another SMTP server.
- Ensure a mailbox exists only on the source server (not on Stalwart).
- Send an email to that mailbox through Stalwart.
- Observe that Stalwart rejects the recipient with 550 Mailbox not found instead of relaying it.
Relevant Log Output
No useful log output is produced, even after reproducing the issue.
SMTP delivery report:
host ‘localhost’ rejected command ‘RCPT TO:[email protected]’ with code 550 (5.5.0) 'Mailbox not found.
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
OIDC
Additional Context
Host OS: AlmaLinux
Running with Podman using network_mode: host
Reverse proxy in front of Stalwart
Split delivery is being used during a migration from another mail server.
The issue occurs only for recipients that are not local to Stalwart but should be relayed to the source server.
The Allow Relaying option is enabled and saved for the domain.
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