code wiki / _hdl_build / nx_email_provision_lib.nx

nx_email_provision_lib.nx

buildroot/runtime/_hdl_build/nx_email_provision_lib.nx

4427 B79 linesdepth 10pulls 18 transitivereach 2 importersview sourcekind librarytopic email
docsdependenciesstructsconstsfunctions

about

nx_email_provision_lib.nx -- DATA-DRIVEN per-domain EMAIL provisioning (operator: finish andelinwest email, and "not just andelinwest but all our sites"). Generalizes the jasonewest DNS-gate fixture into a reusable provisioner keyed by domain: generate (or REUSE) the domain's ed25519 DKIM keypair, derive the public key, emit the publishable DNS zone (MX/SPF/DKIM/DMARC via the proven nx_dns_zone), and persist artifacts under knowledge/status/<domain>_*. IDEMPOTENT (Rule 10): if a private key already exists for the domain it is REUSED, so a previously published DKIM pubkey stays valid across re-provisioning. The same keypair signs outbound (nx_email_send) and the same domain string drives the receiving MTA's own-domain accept (nx_email_mta). Composes nx_email_dns + ed25519 + base64. license_tier: ORIGINAL

dependencies 5 imports · 2 importers

nx_email_dns.nx nx_email_auth.nx nx_csprng.nx nx_base64.nx nx_syscalls.nx nx_email_provision_lib.nx nx_email_provision.nx nx_email_provision_gate.nx

imports: nx_email_dns.nxnx_email_auth.nxnx_csprng.nxnx_base64.nxnx_syscalls.nx

imported by: nx_email_provision.nxnx_email_provision_gate.nx

structs

none

consts

none

functions

15func ep_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
16func ep_cat(out: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { out[o] = s[i]; o = o + 1; i = i + 1 } return o }
19func ep_path(domain: *u8, suffix: *u8, out: *u8) -> i64
called by 2: ep_load_privep_provision calls 1: ep_cat
25func ep_write(path: *u8, buf: *u8, n: i64, mode: i64) -> i64
34func ep_load_priv(domain: *u8, priv32: *u8) -> i64
43func ep_hexbyte(out: *u8, oi: i64, b: i64) -> i64
called by 1: ep_provision
55func ep_provision(domain: *u8, host: *u8, ip: *u8, selector: *u8, priv32: *u8, pub32: *u8, zoneout: *u8, zonecap: i64) -> i64