INBUXA's webmail built its own source into every image: the whole tree,
web and server, packed as dist/source.tar.gz with an identity string
beside the link naming the exact tree it came from. The sign-in page and
Settings > About offered that download.
It answered the AGPL precisely -- the source of *this* build, uncommitted
work and all -- but it paid for that precision by carrying 2.5 MB of
source into production on every deploy, to a repository that is public
and already has it. The fork is at github.com/inbuxa/ihasmail-inbuxa;
the version shown directly above the link already names the commit the
build came from, so the link and the version together say the same
thing the archive said.
Both links now go there, through the mechanism upstream ihasmail already
has and this fork had replaced: the server's SOURCE_URL, read from
/api/config on the sign-in page and from the session in About, with
web/src/lib/source.ts as the fallback before either answers. That
mechanism is better than a hardcoded URL for the deployer who patches
this tree -- they set SOURCE_URL and both links follow -- which is the
case the AGPL is actually about. The defaults in config.ts, the compose
file and .env.example move from the upstream repo to this one, since a
build from this tree is a modified ihasmail and its offer is ours.
Removed with it: scripts/source-archive.mjs and its type stub, the Vite
plugin that ran it, __SOURCE_ID__, and SOURCE_ARCHIVE/SOURCE_ID. The
build no longer shells out to git or tar, and nothing is written next
to the app.
Links to Coffey-Labs/ihasmail that are credit rather than a source
offer -- the README's "built on", the translation issue link -- are
left alone.
No new strings: "AGPL-3.0 source" is unchanged, and the About line keeps
its existing {source} placeholder, now filled with the host and path
instead of a file name.
117 lines
5.0 KiB
Bash
117 lines
5.0 KiB
Bash
# ---- ihasmail server configuration ----
|
|
|
|
# Base URL of your mail server (scheme + host, no path). ihasmail discovers
|
|
# the JMAP session at <MAIL_SERVER_URL>/.well-known/jmap.
|
|
MAIL_SERVER_URL=https://mail.example.com
|
|
|
|
# Random secret used to derive encryption keys for persisted sessions.
|
|
# Generate with: openssl rand -base64 48
|
|
APP_SECRET=change-me
|
|
|
|
# Listen address
|
|
HOST=0.0.0.0
|
|
PORT=8080
|
|
|
|
# Serve the app from a subpath instead of the domain root, for a reverse proxy
|
|
# that maps https://example.com/mail/ here. Leave it unset for the root, which
|
|
# is what every deployment gets unless it asks otherwise. "/mail", "mail" and
|
|
# "/mail/" all mean the same thing.
|
|
#
|
|
# The prefix must reach ihasmail intact -- do not strip it in the proxy -- and
|
|
# it has to be set for the *build* as well as the run: the web bundle writes
|
|
# its own asset URLs, so a build that does not know the prefix produces an app
|
|
# that cannot load itself under one. With Docker that means
|
|
# `--build-arg BASE_PATH=/mail` alongside `-e BASE_PATH=/mail`.
|
|
# BASE_PATH=/mail
|
|
|
|
# Set to "1" when running behind a TLS-terminating reverse proxy (trusts
|
|
# X-Forwarded-* and marks cookies Secure). Set to "0" for plain-HTTP dev.
|
|
TRUST_PROXY=1
|
|
# Peers whose X-Forwarded-* headers are believed. Unset means loopback and the
|
|
# private ranges, which covers a reverse proxy on the same host or Docker
|
|
# network. A request from anywhere else is attributed to its socket address,
|
|
# whatever the headers claim -- otherwise anyone could pick their own key for
|
|
# the login rate limiter.
|
|
# TRUSTED_PROXIES=10.0.0.0/8,192.168.1.5
|
|
SECURE_COOKIES=auto
|
|
|
|
# Session lifetime (idle timeout) in seconds. "Remember me" extends to SESSION_REMEMBER_TTL.
|
|
SESSION_TTL=43200
|
|
SESSION_REMEMBER_TTL=2592000
|
|
|
|
# Where to persist sessions so restarts don't log everyone out (optional).
|
|
# Leave it empty to hold sessions in memory only, which is what an immutable
|
|
# instance does -- see IMMUTABLE below.
|
|
SESSION_FILE=./data/sessions.json
|
|
|
|
# Assert that this instance is running as an immutable container: read-only
|
|
# root filesystem, no durable state of its own. It is checked rather than
|
|
# taken on trust -- the server refuses to start if SESSION_FILE is set, or if
|
|
# the filesystem it is installed on turns out to be writable. Off by default.
|
|
# Running one looks like:
|
|
# docker run --read-only --tmpfs /tmp -e IMMUTABLE=1 -e SESSION_FILE= ...
|
|
# The cost today is that a restart signs everyone out, since there is nowhere
|
|
# left to keep the sessions. Removing that cost is what the OAuth work is for.
|
|
# IMMUTABLE=1
|
|
|
|
# Upstream timeouts / limits
|
|
UPSTREAM_TIMEOUT=30000
|
|
MAX_UPLOAD_BYTES=52428800
|
|
|
|
# Remote-image privacy proxy (Gmail-style). Set to 0 to load remote images directly.
|
|
IMAGE_PROXY=1
|
|
|
|
# In-app administration, for accounts whose role on the mail server manages accounts and
|
|
# domains. 0 turns it off for everyone: no menu, and the JMAP proxy refuses
|
|
# the mail server's registry methods beyond an account's own password, app passwords
|
|
# and settings. INBUXA Admin is not affected.
|
|
ADMINISTRATION=1
|
|
|
|
# Branding
|
|
APP_NAME=ihasmail
|
|
|
|
# Where this instance's source can be had. ihasmail is AGPL-3.0-or-later, which
|
|
# asks whoever runs a modified version to offer *that* version's source -- so if
|
|
# you have patched it, point this at your own tree. Shown on the sign-in page
|
|
# and in Settings > About. INBUXA's webmail is itself a modified ihasmail, so
|
|
# the default is this fork.
|
|
SOURCE_URL=https://github.com/inbuxa/ihasmail-inbuxa
|
|
|
|
# ---- Settings this installation decides (all optional) ----
|
|
#
|
|
# Seed what a new account starts on, lock what nobody may change, and turn
|
|
# something on once for accounts that already exist. Setting none of these --
|
|
# the default -- behaves exactly as ihasmail always has.
|
|
#
|
|
# A file is easier once there are `changes` in it. See the shipped
|
|
# settings-policy.example.json, and mount it read-only:
|
|
#
|
|
# -v /srv/ihasmail/policy.json:/etc/ihasmail/policy.json:ro
|
|
#
|
|
# SETTINGS_POLICY_FILE=/etc/ihasmail/policy.json
|
|
#
|
|
# Or inline, which is what an immutable deployment with no volume wants. These
|
|
# are ignored entirely when SETTINGS_POLICY_FILE is set, so a file and a stray
|
|
# variable cannot half-apply between them.
|
|
#
|
|
# SETTINGS_DEFAULTS={"externalSenderBanner":true}
|
|
# SETTINGS_ENFORCED={"externalRecipientConfirm":true}
|
|
# SETTINGS_CHANGES=[{"version":"20260902084513","settings":{"externalSenderBanner":true}}]
|
|
#
|
|
# Read once at startup: editing a policy means restarting the container.
|
|
# Docs: https://docs.ihasmail.org/configure/#settings-your-installation-decides
|
|
|
|
# ---- Several mail servers (optional) ----
|
|
#
|
|
# Choose the upstream by the domain someone signs in with. MAIL_SERVER_URL above
|
|
# stays required and stays the default; this only adds domains that go
|
|
# elsewhere. See the shipped mail-servers.example.json, and mount it
|
|
# read-only:
|
|
#
|
|
# -v /srv/ihasmail/servers.json:/etc/ihasmail/servers.json:ro
|
|
#
|
|
# MAIL_SERVERS_FILE=/etc/ihasmail/servers.json
|
|
#
|
|
# An unlisted domain, or a username with no domain, goes to MAIL_SERVER_URL. A
|
|
# listed domain never falls back. Read once at startup: editing means a restart.
|