Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.

msmtpd: add forked SMTP delivery workflows - #42

Open
brandonpayton wants to merge 4 commits into
mainfrom
migrate/msmtpd-service
Open

msmtpd: add forked SMTP delivery workflows#42
brandonpayton wants to merge 4 commits into
mainfrom
migrate/msmtpd-service

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jul 11, 2026

Copy link
Copy Markdown
Member

Why

Kandelo applications need a normal way to accept and deliver email through the
Simple Mail Transfer Protocol (SMTP). The tap does not yet provide the server
and its matching delivery client together, so it cannot prove the service's
child-process and exit-status behavior through Homebrew. Adding msmtpd 1.8.32
and msmtp matters because mail-using applications must see real delivery
successes and failures instead of a wrapper that always appears to work.

What changed

  • Build source SHA-256 20cd58b58dd007acf7b937fa1a1e21f3afb3e9ef5bbcfb8b4f5650deadc64db4 with the registry's minimal non-TLS/non-SASL/non-NLS surface.
  • Install both msmtpd and the msmtp companion at a stable guest opt path rather than embedding a host Cellar or nonexistent /usr/local command.
  • Optimize before fork instrumentation.
  • Validate both final outputs with the shared fork: :required contract; msmtpd directly forks/popends and msmtp's reachable password-evaluation path uses popen.
  • Retain only the package-specific env import allowlist permitting __channel_base and memory.
  • Declare full-name tap Dash as the exact test-only /bin/sh closure.

The inetd test proves:

  • content-checked Dash delivery success
  • child exit 75 becomes SMTP 451
  • the installed default msmtp command launches and reaches honest EX_CONFIG 78 when no account is configured

Exact source head

Base: c5705667a90b05754d2244a362f3f7fc95d2f9c3

Head: 50cf10fe5fe47d4904ef702b0fd95f257046217e

Formula SHA-256: 800c0bd8d877d1efe190e1fd927e80578ac18e20c9a385a11fe42fc6f925f05f

The first three restack commits preserve accepted functional recipe/tests. The fourth contract commit replaces obsolete duplicated ABI/Asyncify/fork guards with one shared validator call per output while retaining only the exact import allowlist. Ruby syntax, guard audit, ancestry, diff, scope, and clean-worktree checks pass.

A fresh exact-head source build/runtime test was not run for this restack.

Historical runtime evidence

The content-equivalent implementation previously established on ABI 18:

  • exact source build and literal Formula test passed
  • inetd mode validated content delivery, exit-75 propagation, and default msmtp launch
  • direct daemon Node and Chromium probes completed accept -> fork -> delivery when layered with the finite poll-deadline fix
  • both artifacts imported fork, exposed complete continuation exports, contained no Asyncify, and contained no builder paths

That is historical source/platform evidence, not current ABI 39 bottle or pour evidence.

Final platform gates

Locked PR #907 at exact bcb02e93817ba757cac3bb4a1666aa46e195193f / ABI 39 contains the equivalent finite readiness-deadline behavior plus the reviewed fork/network platform stack. The stale #862 cursor design is explicitly excluded and is not a gate.

Separate build/rebuild gates remain #842, #873, #874, #883, #882, and deterministic #888-on-#889.

#903 is not presently demonstrated necessary because the historical artifacts passed ABI extraction; final ABI 39 bytes must be revalidated. #905 is not a separate gate because these are fork/popen paths and #905 is already included in #907.

Publication gates

Publication requires #881/#887/#890/#885/#895/#900 plus tap #22 and ABI-checked bootstrap #902. Publish/pour exact Dash first, rebuild both outputs at ABI 39, run literal Formula test, and then run stock Node/Chromium inetd and daemon accept/fork/delivery/termination/leak checks.

Dash is a test-only Formula closure, not an msmtpd runtime receipt edge.

Remaining platform gap

Shared Errno at #907 still omits Linux/POSIX EHOSTUNREACH=113 even though host networking can return 113. This is a standalone main-repo errno fidelity gap, not a Formula defect or source-review blocker for the proven local SMTP paths. The Formula must not compensate for it; correct unreachable-host errno claims wait on the platform fix.

No bottle block, binary artifact, platform change, or ABI change is included.

@brandonpayton
brandonpayton force-pushed the migrate/msmtpd-service branch from 2e9460c to e4d73c4 Compare July 11, 2026 23:42
@brandonpayton
brandonpayton force-pushed the migrate/dash-shell branch 2 times, most recently from b42c261 to 7a0f649 Compare July 12, 2026 01:08
@brandonpayton
brandonpayton force-pushed the migrate/msmtpd-service branch from e4d73c4 to 9cc42e1 Compare July 12, 2026 01:14
@brandonpayton
brandonpayton changed the base branch from migrate/dash-shell to main July 12, 2026 01:14
Both installed programs carry real fork paths: msmtpd uses fork and popen for delivery sessions, while msmtp links its popen-backed eval and passwordeval support. Replace the duplicated ABI, Asyncify, and fork checks with the tap-owned final-artifact validator and retain only the formula-specific env-import allowlist.
@brandonpayton
brandonpayton force-pushed the migrate/msmtpd-service branch from 9cc42e1 to 50cf10f Compare July 13, 2026 02:40
@brandonpayton

Copy link
Copy Markdown
Member Author

Independent exact-head re-review completed for 50cf10fe5fe47d4904ef702b0fd95f257046217e: ACCEPT for source review; not merge/publish ready.

  • The contract commit fully removes duplicate generic guards, retains only the exact __channel_base|memory allowlist, and invokes the shared fork-required validator once for each installed output.
  • Both msmtp and msmtpd truthfully require fork instrumentation.
  • Functional recipe/tests remain accepted; exact Tap.fetch and Dash test closure are correct.
  • Historical inetd/daemon evidence is nonpublishable source/platform evidence only.
  • Final baseline is #907 / ABI 39 plus #842/#873/#874/#883/#882/#888-on-#889 and the trusted publisher/bootstrap/Dash-bottle stack.
  • #903 is evidence-triggered, not currently required; #905 is not a separate fork/popen gate.
  • EHOSTUNREACH=113 remains a standalone platform errno gap and must not receive a Formula workaround.

No Formula blocker remains.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant