Skip to content

🚀: Export (and Import) ALL settings (not mails etc.) #1484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
pepa65 opened this issue May 12, 2025 · 8 comments
Open
1 task done

🚀: Export (and Import) ALL settings (not mails etc.) #1484

pepa65 opened this issue May 12, 2025 · 8 comments
Labels
enhancement New feature or request

Comments

@pepa65
Copy link

pepa65 commented May 12, 2025

Which feature or improvement would you like to request?

I'd like to see this feature:
An option in the GUI to Export ALL settings, and a way to Import ALL settings.
So that a Stalwart instance can be recreated by just importing the settings file.

(For me, this doesn't have to be through the GUI. Actually, bypassing the GUI completely for this I would find desirable. But for the GUI people, they will want to have this option in the GUI.)

Is your feature request related to a problem?

I'm having a problem with...
Recreating a Stalwart instance. What had been recommended was to backup the whole /opt/stalwart-mail directory, and put it back on a new install, but I have found this not to work well.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@pepa65 pepa65 added the enhancement New feature or request label May 12, 2025
@dougmeredith
Copy link

If moving /opt/stalwart-mail didn't work, then something weird has happened. I've successfully moved Stalwart from one host to another this way. Did you shut down Stalwart before copying the directory? Could the content have been corrupted in transit somehow?

@pepa65
Copy link
Author

pepa65 commented May 13, 2025

No, I stopped it, tarred up the directory, transferred and unpacked it. I wasn't happy with how it seemed to run, so I did a fresh install and redid all the settings. It would be nice if I could redo the settings from a single settings file. Then if settings need to be changed, they can be changed beforehand, and the GUI doesn't need to be involved.

@dougmeredith
Copy link

That's the same process that I used to migrate it, although I do all of my settings in the TOML file, rather than using the GUI.

@pepa65
Copy link
Author

pepa65 commented May 13, 2025

It would be great if ALL settings could be in the config.toml. (And maybe they already can, but how to get them in there? That's basically what this feature request is about.)

@dougmeredith
Copy link

dougmeredith commented May 13, 2025

The way configuration works in Stalwart is confusing and error prone. Getting everything into the config file wasn't an easy process. Firstly you need something like:

[config]
local-keys = [ "store.*", "directory.*", "tracer.*", "server.*", "!server.blocked-ip.*",
               "authentication.fallback-admin.*", "cluster.node-id", "storage.data",
               "storage.blob", "storage.lookup",  "storage.fts", "storage.directory",
               "server.hostname", "certificate.*", "jmap.*", "session.*", "queue.*",
               "remote.*", "report.*"]

That tells Stalwart which config keys should be taken from the config file.

@pepa65
Copy link
Author

pepa65 commented May 13, 2025

Wow, that is great to know! Probably deserves to be documented officially. But that really needs to be made easier though.

@dougmeredith
Copy link

It is documented:

https://stalw.art/docs/configuration/overview

But, yes, I think there are much more simple and much less error-prone ways for Stalwart configuration to work.

@pepa65
Copy link
Author

pepa65 commented May 14, 2025

[config]
local-keys = [ "store.*", "directory.*", "tracer.*", "server.*", "!server.blocked-ip.*",
               "authentication.fallback-admin.*", "cluster.node-id", "storage.data",
               "storage.blob", "storage.lookup",  "storage.fts", "storage.directory",
               "server.hostname", "certificate.*", "jmap.*", "session.*", "queue.*",
               "remote.*", "report.*"]

OK, so that is the default, plus: "jmap.*", "session.*", "queue.*", "remote.*", "report.*"

And store.*, storage.*, and server.* should always be in the local configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants