code wiki / _hdl_build / nx_email_mta_daemon.nx

nx_email_mta_daemon.nx

buildroot/runtime/_hdl_build/nx_email_mta_daemon.nx

2049 B47 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 md_addr sys_socket md_puts sys_write sys_exit sys_bind sys_listen sys_accept 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 ↻ nx_pop3_dedot nx_mbox_append nx_mbox_count sys_mmap ↻ ss_get_cap sys_mmap ↻ ss_scan_cap sys_mmap ↻ ss_manifest_cap ss_scan_seglist mbox_atoi sys_mmap ↻ mbox_key mbox_itoa sys_mmap ↻ mbox_itoa ↻ ss_begin ss_begin_cap

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