Your question
We’re moving a setup from 0.15.5 to 0.16 and I’m trying to work out how to rebuild our recipient handling, now that catch-all and sub-addressing have moved into the Domain object.
The setup: Google Workspace is our primary MX. Google delivers anything it knows about, and anything it doesn’t recognise gets routed on to Stalwart. Stalwart hosts a subset of the mailboxes for the same domain — so it’s a split-delivery arrangement.
What we needed Stalwart to do:
Deliver locally when the recipient is a real Stalwart account.
Strip plus-addressing for our local domains.
Only fall back to the catch-all for unauthenticated, externally-originated mail to a local domain when the address isn’t a real account — and not let the catch-all swallow everything Google forwards in. The catch-all was only ever meant for the external path, never for the internal/forwarded flow.
On 0.15.5 we did all of this with three RCPT-stage rewrite rules:
# 1) real local recipient -> leave untouched
if: is_local_address('', rcpt)
then: rcpt
# 2) plus-addressing on a local domain -> strip the tag
if: contains(rcpt, '+') && is_local_domain('', rcpt_domain)
then: split(rcpt, '+')[0] + '@' + split(rcpt, '@')[1]
# 3) unauthenticated mail to a local domain, address is not a real account -> catch-all
if: is_empty(authenticated_as) && !is_local_address('', rcpt) && is_local_domain('', rcpt_domain)
then: '@' + rcpt_domain
On 0.16, catchAllAddress and subAddressing are now per-domain fields on the Domain object, and there’s an allowRelaying flag described as being for split delivery. So the expression-driven logic we had doesn’t map 1:1 anymore.
What I’m trying to pin down:
Are RCPT-stage expression rewrites still in play on 0.16 (MtaStageRcpt), or is recipient handling now fully driven by the Domain object?
If I leave catchAllAddress empty on the domain, do I lose the catch-all completely, or can it still be triggered conditionally the way rule 3 did?
The important part is the conditional behaviour: catch-all for external/unauthenticated unknown recipients, but ignored for the mail Google forwards in. Is that still expressible, and if so where — on the Domain (a Custom sub-addressing rule?), or still at the RCPT stage?
Is allowRelaying the intended mechanism for the “Google in front, Stalwart as a partial backend” case?
Has anyone rebuilt this kind of split-delivery + conditional catch-all on 0.16 and can point me at the right place to configure it? CLI/JMAP examples very welcome.
Thanks.
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