code wiki / _hdl_build / nx_email_mta_daemon.nx

nx_email_mta_daemon.nx

buildroot/runtime/_hdl_build/nx_email_mta_daemon.nx

2331 B50 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind servicetopic email
docsdependenciesstructsconstsfunctions

about

nx_email_mta_daemon.nx -- runnable receiving MTA: bind 127.0.0.1:2525 and accept SMTP connections forever, delivering to the mailbox store. This is the continuously-running server (vs the one-shot serve in the gate). Monotonic segid counter across connections (each connection's deliveries use a fresh segid range) so segments never collide. Cross-restart segid persistence is a follow-on. Loopback bind only -- public bind is a separate operator opt-in (see EMAIL-D4). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_email_mta_io.nx nx_syscalls.nx nx_email_mta_daemon.nx

imports: nx_email_mta_io.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_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ md_addr sys_socket md_puts sys_write ↻ sys_exit ↻ sys_bind sys_listen sys_accept sys_set_socket_timeout sys_mmap ↻ sys_setsockopt sys_munmap nx_mta_serve_conn mtaio_send sys_write ↻ sys_mmap ↻ mtaio_recv_line sys_read nx_mta_parse_cmd mta_verb_eq mta_upper mtaio_send_code mtaio_send ↻

structs

none

consts

13const MD_PORT: i64 = 0x09DD // 2525
14const MD_PREFIX: *u8 = "knowledge/status/jbox/"
15const MD_DOMAIN: *u8 = "jasonewest.com"

functions

17func md_addr(out: *u8, port: i64) -> i64
called by 1: main
25func md_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
27func main() -> i64