code wiki / _hdl_build / nx_email_live_gate.nx

nx_email_live_gate.nx

buildroot/runtime/_hdl_build/nx_email_live_gate.nx

7959 B179 linesdepth 5pulls 11 transitivereach 0 importersview sourcekind gate/prooftopic email
docsdependenciesstructsconstsfunctions

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

nx_email_mta_io.nx nx_connect.nx nx_smtp_client.nx nx_syscalls.nx nx_email_live_gate.nx

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

main sys_mkdir sys_openat_wr sys_close slen sys_mmap nx_smtp_dot_stuff g_addr sys_socket jm_log sys_openat_append g_write sys_write slen ↻ sys_close ↻ sys_exit sys_bind sys_listen sys_fork g_run_client sys_socket ↻ nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_mmap ↻ g_read_reply g_recv_line sys_read nx_smtp_parse_reply first_code_or_badline smtp_is_digit nx_smtp_build_ehlo sm_cat sm_catn g_write ↻ nx_smtp_build_mail_from sm_cat ↻ sm_catn ↻

structs

none

consts

22const JM_PORT: i64 = 0x2444 // 9284
23const JM_LOG: *u8 = "knowledge/status/jmail_live.log"
24const JM_PREFIX: *u8 = "knowledge/status/jmail/"
25const JM_DOMAIN: *u8 = "jasonewest.com"
26const JM_MBOX: *u8 = "self@jasonewest.com"

functions

28func g_addr(out: *u8, port: i64) -> i64
called by 1: main
37func g_write(fd: i64, buf: *u8, n: i64) -> i64
called by 3: g_run_clientjm_logmain calls 1: sys_write
42func g_recv_line(fd: i64, buf: *u8, cap: i64) -> i64
called by 1: g_read_reply calls 1: sys_read
53func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
54func 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
57func g_read_reply(fd: i64, buf: *u8, cmpl: *i64, cons: *i64) -> i64
74func g_run_client(addr: *u8, stuffed: *u8, dslen: i64) -> i64
111func jm_log(green: i64, delivered: i64, child_code: i64) -> i64
121func main() -> i64