code wiki / _hdl_build / nx_email_live_gate.nx
nx_email_live_gate.nx
buildroot/runtime/_hdl_build/nx_email_live_gate.nx
about
nx_email_live_gate.nx -- LIVE LOOPBACK: a real SMTP delivery to
self@jasonewest.com, end to end over a socket, every byte OUR stack.
fork pattern (per _h2_serve_loopback_gate): parent = the live MTA
server (nx_mta_serve_conn = R7 FSM + R4 dedot + R3 store delivery);
child = an SMTP CLIENT built from R1 (nx_smtp_client builders +
dot-stuffing + reply parse) that connects and sends a real message.
After reaping the child the parent FETCHES the delivered message from
the store and asserts it is byte-identical to what was sent.
GREEN iff: client walked 220->EHLO->MAIL->RCPT->DATA(354)->body->250
->QUIT(221) with matching codes; the server delivered 1 copy; and the
stored message for self@jasonewest.com equals the sent body exactly.
Evidence -> knowledge/status/jmail_live.log (JMAILGATE ... verdict=GREEN)
license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_email_mta_io.nxnx_connect.nxnx_smtp_client.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 22 | const JM_PORT: i64 = 0x2444 // 9284 |
| 23 | const JM_LOG: *u8 = "knowledge/status/jmail_live.log" |
| 24 | const JM_PREFIX: *u8 = "knowledge/status/jmail/" |
| 25 | const JM_DOMAIN: *u8 = "jasonewest.com" |
| 26 | const JM_MBOX: *u8 = "self@jasonewest.com" |
functions
| 28 | func g_addr(out: *u8, port: i64) -> i64 called by 1: main |
| 37 | func g_write(fd: i64, buf: *u8, n: i64) -> i64 |
| 42 | func g_recv_line(fd: i64, buf: *u8, cap: i64) -> i64 |
| 53 | func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 54 | func memeq(a: *u8, b: *u8, len: i64) -> i64 { var i: i64 = 0; while i < len { if a[i] != b[i] { return 0 } i = i + 1 } return 1 } called by 1: main |
| 57 | func g_read_reply(fd: i64, buf: *u8, cmpl: *i64, cons: *i64) -> i64 |
| 74 | func g_run_client(addr: *u8, stuffed: *u8, dslen: i64) -> i64 called by 1: main calls 11: sys_socketnx_connect_boundedsys_mmapg_read_replynx_smtp_build_ehlog_write+5 |
| 111 | func jm_log(green: i64, delivered: i64, child_code: i64) -> i64 |
| 121 | func main() -> i64 |