No web interface on the mail host: first boot installs and downloads none (SPEC §5.3)

This commit is contained in:
2026-09-18 13:10:32 -07:00
parent c2be7e2956
commit 05d220ae4f
3 changed files with 16 additions and 27 deletions
+4 -22
View File
@@ -54,28 +54,10 @@ async fn insert_safe_defaults(bp: &mut Bootstrap) -> trc::Result<()> {
let is_recovery_mode = bp.registry.is_recovery_mode();
let is_bootstrap_mode = bp.registry.is_bootstrap_mode();
#[cfg(not(feature = "test_mode"))]
if bp.registry.count_object(ObjectType::Application).await? == 0 {
bp.registry
.write(RegistryWrite::insert(
&Application {
auto_update_frequency: Duration::from_millis(30 * 24 * 60 * 60 * 1000),
description: "Stalwart Web Interface".to_string(),
enabled: true,
#[cfg(not(feature = "dev_mode"))]
resource_url:
"https://github.com/stalwartlabs/webui/releases/latest/download/webui.zip"
.into(),
#[cfg(feature = "dev_mode")]
resource_url: "file:///Users/me/code/webui/.ignore/webui.zip".into(),
unpack_directory: None,
oauth_client_id: None,
url_prefix: Map::new(vec!["/admin".into(), "/account".into()]),
}
.into(),
))
.await?;
}
// inbuxa: no web interface is installed on the mail host, and nothing is
// downloaded for one (docs/spec/SPEC.md §5.3). Administration is INBUXA
// Admin and webmail is ihasmail, both deployed separately. An install
// upgraded from Stalwart keeps any web application it already has.
if is_bootstrap_mode {
#[cfg(not(any(feature = "dev_mode", feature = "test_mode")))]
+9 -2
View File
@@ -380,10 +380,16 @@ Upstream installs its web interface at first boot, serving `/admin` and
`/account` from the mail server itself, by inserting a default web application
that downloads a release of `stalwartlabs/webui` from GitHub. The fork:
- inserts no default web application, and never fetches anything at boot;
- inserts no default web application, and downloads no web interface;
- keeps the generic web-application mechanism for operators who want it,
documented as unsupported.
Done 2026-09-18. A first boot of the debug build answered 404 on `/admin` and
`/account` in bootstrap mode and after setup, held no web application and no
OAuth client, and logged no download. Setup worked over JMAP. An install
upgraded from Stalwart keeps any web application it has, and contract C-6
still registers its OAuth client.
Where each of the web interface's jobs goes:
| Was | Becomes |
@@ -455,7 +461,8 @@ Oneshot's sequence, all over JMAP, with no web interface involved:
Found at the fork's first boot, and to fix:
- On first boot the server downloads Stalwart's web interface
(`webui.zip` from GitHub) before anything is configured. §5.3 removes this.
(`webui.zip` from GitHub) before anything is configured. Removed
2026-09-18 (§5.3).
- Whenever `STALWART_RECOVERY_ADMIN` is set, its password is a full admin
login, outside bootstrap and recovery mode too. oneshot is safe, because
it recreates the container without the variable once setup is done, but a
+3 -3
View File
@@ -104,9 +104,9 @@ Each has an ID, and tests name the IDs they check.
start. Until `x:FrontEnds` exists, three environment variables stand in for
it: `INBUXA_ADMIN_URL`, `INBUXA_WEBMAIL_URL` and
`INBUXA_WEBMAIL_CLIENT_SECRET` (the webmail client is registered only when
both of its variables are set). The web interface the server still serves
itself (`/admin`, `/account`, until SPEC.md §5.3 removes it) is registered
too, as its application's OAuth client id or `stalwart-webui`, at the
both of its variables are set). A web interface the server serves itself
(none on a new install since SPEC.md §5.3; possible on one upgraded from
Stalwart) is registered too, as its application's OAuth client id or `stalwart-webui`, at the
server's public URL. A missing client is created. An existing one gains any
redirect URI it lacks, and the webmail client gets the configured secret.
Nothing an operator added is removed. Bootstrap and recovery mode skip this: