V0.16: Enable "Allow Relaying" as default for all domains

Your question

Hi everyone,

In Stalwart I can enable the “Allow Relaying” option per domain under the domain settings. However, this option is optional and disabled by default, so I have to turn it on manually for every every domain.

Is there a way to set “Allow Relaying” globally as a default, so that it’s automatically active for all (or all newly created) domains?

If this can be done via the configuration file rather than the web interface: which configuration key controls this, and what would the corresponding entry look like?

Thanks in advance for your help!

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

Let me research how relay settings work in Stalwart.

There is currently no global “default allowRelaying = true for all domains” setting. Here is what the docs confirm:

  • allowRelaying is a per-Domain boolean on the Domain object (default false). It must be set individually on each domain object. There is no global default that can be flipped to pre-set it for all domains.

  • There is a separate, related setting on the MtaStageRcpt singleton (allowRelaying expression) – but that one governs relaying to entirely non-local domains (e.g. for outbound relay), not the split-delivery scenario you described.

What you can do instead:

  1. Bulk-update existing domains via the JMAP API. Fetch all your Domain objects with x:Domain/get and then issue an x:Domain/set update for each one, setting "allowRelaying": true. This is scriptable with curl or stalwart-cli.

  2. Set it when creating each domain via the JMAP API’s x:Domain/set create call by including "allowRelaying": true in the creation payload – this way new domains get it from the start.

There is no configuration knob to change the factory default of false for allowRelaying across all domains automatically.

Relevant docs:

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.

The bot is correct, there is no global default but you could use the CLI or JMAP API to bulk set or create domains with this setting enabled.