import { useSession } from "@/store/session"; import { client } from "@/jmap/client"; import { DEFAULT_SOURCE_URL } from "@/lib/source"; import { APP_VERSION } from "@/lib/version"; export function AboutSettings() { const session = useSession((s) => s.session); const caps = Object.keys(session?.capabilities ?? {}); // A deployment running modified code should offer its own source, not ours. const sourceUrl = session?.ihasmail?.sourceUrl ?? DEFAULT_SOURCE_URL; return (

About ihasmail

A fast, friendly, open-source webmail for Stalwart Mail Server, built on JMAP.

ihasmail
ihasmail v{APP_VERSION}
AGPL-3.0-or-later ยท {sourceUrl.replace(/^https?:\/\//, "")}

Server

Signed in as{session?.username}
Stalwart{describeServer(session?.ihasmail?.server)}
Accounts{Object.values(session?.accounts ?? {}).map((a) => a.name).join(", ")}
Max upload{Math.round(client.maxSizeUpload / 1048576)} MB
Image privacy proxy{session?.ihasmail?.imageProxy ? "enabled" : "disabled"}

Stalwart does not publish its version number to mail clients, so ihasmail reports the edition where the server gives one. ihasmail requires 0.16 or newer, and sign-in refuses anything older.

The middle number of ihasmail's own version is the Stalwart generation it is built for: v2.16.x targets Stalwart 0.16. The last is the pull request it was built from, and a trailing +g and short commit means the build is past that pull request rather than exactly it.

Server capabilities

{caps.map((c) => {c.replace("urn:ietf:params:jmap:", "")})}
); } /** * Stalwart deliberately withholds its version from clients (it reports a fixed * "1.0.0" wherever it publishes one at all), so the edition is all there is to * show. The generation used to be reported here too, back when ihasmail spoke * to both 0.15 and 0.16; it requires 0.16 now, so signing in at all is the * answer to that question. */ function describeServer(server: { edition?: string | null } | undefined): string { return server?.edition ? `0.16 or newer (${server.edition})` : "0.16 or newer"; }