MTA Auth Stage expression only applies after restart

Issue Description

Setting MtaStageAuth.mustMatchSender to { “else”: “false” } and then trying to send mail from a different address does not work until restarting the Stalwart server, it then works perfectly fine.

Haven’t yet tested the other expressions, but would not be surprised if the same issue will arise with them.

Expected Behavior

The setting should immediately apply.

Actual Behavior

Stalwart uses the old expression before restarting, then works fine after a restart.

Reproduction Steps

  • Set MtaStageAuth.mustMatchSender to { "else": "false" }.
  • Send mail as a different address.
  • Restart Stalwart.
  • Send mail as a different address.

Stalwart Version

v0.16.x

Installation Method

NixOS

Database Backend

PostgreSQL

Blob Storage

Filesystem

Search Engine

PostgreSQL

Directory Backend

OIDC

Additional Context

  • Sent from Thunderbird desktop.
  • Settings modified through the web UI.

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

Now I have enough to answer confidently: there’s a “Reload Server Settings” action that should apply config changes without restart, and normally MtaStageAuth changes are covered under general settings reload since it’s part of Core config (falls into the _ catch-all branch in reload.rs that reloads Core).

I have enough to answer. Settings edited via the WebUI generally require an explicit “Reload settings” action to take effect, otherwise the running server keeps the old in-memory config until a full restart.

I have a clear answer now.

Stalwart doesn’t automatically apply configuration changes to the running server the moment you save them in the WebUI, it keeps the previously loaded settings in memory until told to reload. This is expected behavior, not specific to mustMatchSender, and applies to server settings in general.

Instead of restarting the whole service, you can trigger a Reload: Server settings action, which reloads the configuration without a full restart. In the WebUI this is available under Management › Actions, and it corresponds to creating an Action object with @type: "ReloadSettings" (the same object type used for reloading TLS certificates, lookup stores, and the blocked IPs list).

See the reference for that object: Action | Stalwart

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

Was not aware of that action, good to know.