Packaging: the binary and package are inbuxa, INBUXA_* settings with STALWART_* fallback

- crates/main: package and [[bin]] renamed to inbuxa; homepage inbuxa.org;
  license AGPL-3.0-only (upstream is dual; the fork takes the AGPL).
- types::branding::env_var reads INBUXA_<name>, falling back to
  STALWART_<name> with a warning, for all nine server settings.
  STALWART_APP_ and STALWART_SPAM_* storage keys are unchanged.
- New-install default paths /var/lib/inbuxa and /var/log/inbuxa.
- Dockerfiles, systemd unit, launchd plist and AppArmor profile renamed.
- Upstream's .github moved to .github-upstream so none of it runs.
- install.sh stubbed: upstream's would install Stalwart.
- Two missed brand strings: the SMTP Received header and the utils user agent.
This commit is contained in:
2026-09-18 11:09:22 -07:00
parent 5ce033e10c
commit d3f0b36dd2
35 changed files with 199 additions and 1205 deletions
+19
View File
@@ -45,3 +45,22 @@ macro_rules! brand_url {
"https://inbuxa.org"
};
}
/// Reads one of the server's environment variables by its unprefixed name,
/// such as `RECOVERY_ADMIN`.
///
/// `INBUXA_<name>` wins. `STALWART_<name>` is still read when the new name
/// isn't set, so an existing Stalwart install moves over without editing its
/// environment, and a warning says which variable to rename.
pub fn env_var(name: &str) -> Result<String, std::env::VarError> {
match std::env::var(format!("INBUXA_{name}")) {
Err(std::env::VarError::NotPresent) => {
let legacy = std::env::var(format!("STALWART_{name}"));
if legacy.is_ok() {
eprintln!("Warning: STALWART_{name} is deprecated; set INBUXA_{name} instead.");
}
legacy
}
found => found,
}
}