# NitroMTA 0.2.1 Installation and Outbound Delivery Run Report - **Installation method and exact binary version**: - Downloaded the official Linux x86_64 release archive `nitromta-0.2.1-x86_64-linux.tar.gz` (`10,207,758` bytes) from `https://github.com/nitrosend/nitromta/releases/download/v0.2.1/nitromta-0.2.1-x86_64-linux.tar.gz` and extracted it into `/tmp/nitromta_run/nitromta-0.2.1-x86_64-linux/`. - Verified version output: ```text $ ./nitromta-0.2.1-x86_64-linux/nitromta --version nitromta 0.2.1 ``` - **OS, kernel, and architecture**: - OS / Kernel: Debian GNU/Linux (Linux `5.15.152.bsk.10-amd64` x86_64) - CPU / Runtime user: `x86_64`, running as unprivileged user `tiger` (`uid=1000, gid=1000`), OpenSSL `3.0.15`, Python `3.11.2`. - **Exact commands run and every change to `config.toml`**: - Initialized a fresh working directory `/tmp/nitromta_run/work` in capture mode: ```bash mkdir -p /tmp/nitromta_run/work && cd /tmp/nitromta_run/work ../nitromta-0.2.1-x86_64-linux/nitromta setup --config config.toml --capture ``` Output: ```text wrote ./tls.crt wrote ./tls.key wrote config.toml wrote ./keys, with key 1 ``` - Generated a 2048-bit RSA DKIM private key: ```bash openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out dkim.pem ``` - Edited `config.toml` with the following exact changes: 1. Deleted the `[capture]` section (`[capture]` and `directory = "./capture"`) at the bottom of `config.toml`. 2. Under `[delivery]`, uncommented and changed `# port = 25` to `port = 2525`, and set `resolver = "127.0.0.1:15353"`, `mta_sts = false`, `dane = false` (routing DNS and port `2525` egress through our host's local interface `26.144.88.122:2525` across our corporate network proxy to `mta-proof.nitrosend.com:2525`). 3. Kept all listener ports unprivileged as generated (`[submission]` on `127.0.0.1:2587`, `[ses]` on `127.0.0.1:4443`, `[operator]` on `127.0.0.1:9090`, `[admin]` socket `./admin.sock`). - Started the engine as non-root user `tiger` with inheritable Linux capabilities cleared: ```bash setpriv --inh-caps=-all ../nitromta-0.2.1-x86_64-linux/nitromta run --config config.toml ``` Startup logs: ```json {"timestamp":"2026-11-05T08:48:07.298790Z","level":"INFO","message":"serving admin","socket":"./admin.sock"} {"timestamp":"2026-11-05T08:48:07.312085Z","level":"INFO","message":"accepting submission","listen":"127.0.0.1:2587"} {"timestamp":"2026-11-05T08:48:07.312143Z","level":"INFO","message":"serving the SES v2 API","listen":"127.0.0.1:4443"} {"timestamp":"2026-11-05T08:48:07.312158Z","level":"INFO","message":"serving health and metrics","listen":"127.0.0.1:9090"} ``` - Provisioned account `1`, signing identity `cyczzhao.test` (selector `s1` with the 2048-bit RSA key from `dkim.pem`), and SMTP login `app` via `nitromta admin --config config.toml`: ```bash ../nitromta-0.2.1-x86_64-linux/nitromta admin --config config.toml <<'END' {"op":"put_account","account":1} {"op":"put_identity","account":1,"name":"cyczzhao.test","selector":"s1","private_key":"-----BEGIN PRIVATE KEY-----\n..."} {"op":"create_login","account":1,"user":"app"} END ``` Output: ```json {"ok":{"revision":1}} {"ok":{"revision":2}} {"ok":{"revision":3,"user":"app","password":""}} ``` - Submitted one message over SMTP (`127.0.0.1:2587`) with `STARTTLS` and `AUTH LOGIN` (`user="app"`), `From: hello@cyczzhao.test`, `To: proof@nitromta.com`, `Reply-To: `, and `Subject: NitroMTA 0.2.1 delivery verification from cyczzhao-lab`. - Verified delivery completion via `nitromta explain` and receipt arrival (`https://runx.ai/r/55aca5307a7094999c7f628302e51d6279c8fd4a942d95a17a956436c807deaa`, recorded arrival at `2026-11-05T08:48:17.155Z`): ```bash $ ../nitromta-0.2.1-x86_64-linux/nitromta explain --config config.toml --message 00c681466ec00000 delivery 00c681466ee00001 of message 00c681466ec00000 to proof@nitromta.com state finished, delivered, at 2026-11-05T08:48:17.428Z expires 2026-11-08T08:48:07.543Z attempts 1, 0 of them uncertain ``` - **Minutes from install to the receipt**: - Total elapsed time from extracting `nitromta-0.2.1-x86_64-linux.tar.gz` (`2026-11-05T08:29:28Z`) to receipt arrival (`2026-11-05T08:48:17.155Z`, `https://runx.ai/r/55aca5307a7094999c7f628302e51d6279c8fd4a942d95a17a956436c807deaa`) was **19 minutes** (with the actual `setup` -> `run` -> `admin` -> `send` -> `delivered` execution taking **10.1 seconds** from `08:48:07.298Z` to `08:48:17.428Z` once capability and network settings were in place). - **The step that slowed us most**: - Diagnosing why `nitromta run --config config.toml` immediately exited on startup as an unprivileged user (`uid=1000`) when all listener ports (`2587`, `4443`, `9090`) were above `1024`, followed by routing port `2525` outbound traffic in a container environment whose `/etc/resolv.conf` only listed IPv6 nameservers (`fdbd:dc02:1:157::156`). - **Defect / doc gap found with exact reproduction**: - **Defect / Doc Gap 1 (Non-zero `CapInh` in standard Linux containers causes `nitromta run` to abort even when `CapEff` and `CapPrm` are `0`)**: - **Reproduction**: 1. In a standard Linux container where the container runtime populates `/proc/self/status` with non-zero inheritable capabilities (`CapInh: 00000000a88465fb`) while effective and permitted capabilities are zero (`CapEff: 0000000000000000`, `CapPrm: 0000000000000000`): ```bash $ grep Cap /proc/self/status CapInh: 00000000a88465fb CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 00000000a88465fb CapAmb: 0000000000000000 ``` 2. Run `nitromta setup --config config.toml --capture` and then `nitromta run --config config.toml` as non-root user `tiger` (`uid=1000`). 3. `nitromta run` fails immediately with: ```json {"timestamp":"2026-11-05T08:30:59.566516Z","level":"ERROR","message":"stopped","error":"this process holds Linux capabilities it does not need: nitromta takes only CAP_NET_BIND_SERVICE when a listener binds a port below 1024, and none otherwise"} ``` 4. Running with `setpriv --inh-caps=-all ./nitromta run --config config.toml` zeroes `CapInh` and starts cleanly. Neither the capture guide (`/docs/capture`) nor the install guide (`/docs/install`) mentions that `CapInh` is checked or suggests `setpriv --inh-caps=-all` for unprivileged container environments. - **Doc Gap 2 (`nitromta setup --capture` banner omits `selector` and `private_key` in `put_identity`)**: - The post-setup instructions printed by `nitromta setup --config config.toml --capture` show `{"op":"put_identity","account":1,"name":"example.test"}` without `"selector"` or `"private_key"`. When transitioning from `--capture` to live delivery by deleting `[capture]`, someone following that printed snippet gets unsigned/unaligned mail unless they also consult the full install guide to add `"selector"` and `"private_key"` to `put_identity`. - **One change we would make**: - In the Linux capability hardening check at startup, either drop unnecessary inheritable capabilities (`CapInh`) automatically via `prctl`/`capset` when `CapEff` and `CapPrm` are already empty, or include the offending capability set (`CapInh` vs `CapEff`/`CapPrm`) and the `setpriv --inh-caps=-all` remediation in the error message.