nx_email_mta_io.nx
buildroot/runtime/nx_email_mta_io.nx
about
nx_email_mta_io.nx -- EMAIL LIVE LAYER: SMTP server over a real socket.
module: nishi-core.email.mta_io
depends: nishi-core.email.mta, nishi-core.email.retrieve, nishi-core.email.mailbox
capability: CORE_EMAIL
Crosses the pure R7 server LOGIC into a running service: read SMTP
command lines off a connected fd, drive the nx_email_mta FSM, collect
the DATA phase, de-dot-stuff it (R4 nx_pop3_dedot), and DELIVER each
accepted recipient's copy into the R3 mailbox store (nx_email_mailbox
over nx_seg_store). One function serves one connection so it drops
straight into an accept loop (the loopback gate forks a client at it;
a real daemon would loop accept()).
This is the receive half of a working mailbox: mail addressed to a
local recipient (e.g. self@jasonewest.com) lands in the store, where
the web UI (next rung) reads it.
license_tier: INDEPENDENT_REDERIVE
genealogy_id: international-research-sources/ietf/rfc_5321
lineage_id: nishi_email_mta_io
nx_safety_envelope:
intended_use: "Serve one inbound SMTP connection: FSM + relay
policy + DATA collect + dedot + store delivery."
sil_target: SIL2 (open relay / mail loss)
evidence: [live_loopback_deliver, relay_refused_on_wire,
byte_exact_after_dedot]
hazard_register: [bug-tape-open-relay, bug-tape-unbounded-data]
residual_risk: "STARTTLS-on-25 + SIZE limit + concurrent accept
loop are follow-ons; this serves one conn."
verdict: NOT_YET_EVALUATED
dependencies 4 imports · 2 importers
imports: nx_syscalls.nxnx_email_mta.nxnx_email_retrieve.nxnx_email_mailbox.nx
imported by: nx_email_live_gate.nxnx_email_mta_daemon.nx
structs
| none |
consts
| 38 | const MTAIO_MAGIC_4096: i64 = 4096 |
| 40 | const MTAIO_MAX_RCPT: i64 = 8 |
| 41 | const MTAIO_DATA_CAP: i64 = 262144 |
functions
| 44 | func mtaio_send(fd: i64, s: *u8) -> i64 |
| 57 | func mtaio_send_code(fd: i64, code: i64) -> i64 |
| 69 | func mtaio_recv_line(fd: i64, buf: *u8, cap: i64) -> i64 |
| 85 | func nx_mta_serve_conn(fd: i64, prefix: *u8, domain: *u8, dlen: i64, segid_base: i64) -> i64 called by 2: mainmain calls 10: mtaio_sendsys_mmapmtaio_recv_linenx_mta_parse_cmdmtaio_send_codenx_pop3_dedot+4 |