nx_email_retrieve.nx
buildroot/runtime/nx_email_retrieve.nx
about
nx_email_retrieve.nx -- EMAIL RUNG R4: POP3 + IMAP retrieval codec.
module: nishi-core.email.retrieve
depends: (none -- pure RFC 1939 / RFC 3501 line codec)
capability: CORE_EMAIL
The client side of FETCHING mail (the receive counterpart to R1's
SMTP send). Pure parse/build over caller buffers -- no syscalls, so
it gates offline against scripted server transcripts; the live socket
wiring is a later nx_email_retrieve_io.nx (the nx_dns/nx_dns_io split).
POP3 (RFC 1939): "+OK"/"-ERR" status, STAT count/octets, a generic
command builder, and multi-line handling -- de-dot-stuffing (the
inverse of R1's SMTP dot-stuffing: a body "." line is sent as
".." and a lone "." terminates) plus terminator detection.
IMAP4rev1 (RFC 3501): tagged command builder, tagged-completion
status (OK/NO/BAD) that correctly SKIPS untagged "*" data lines
(the classic "* OK ..." vs "A001 OK ..." confusion), and literal
"{n}" octet-count parse.
license_tier: INDEPENDENT_REDERIVE
genealogy_id: international-research-sources/ietf/rfc_1939 + rfc_3501
lineage_id: nishi_email_retrieve_r4
nx_safety_envelope:
intended_use: "POP3/IMAP client response parse + command
build. Mail retrieval substrate."
sil_target: SIL2 (mis-parse drops/duplicates mail)
evidence: [RFC_1939_3501_basis, pop3_dedot_inverse,
imap_tagged_vs_untagged, literal_size]
hazard_register: [bug-tape-pop3-dot-unstuff, bug-tape-imap-untagged-confusion]
residual_risk: "IMAP literal continuation streaming + UIDPLUS/
CONDSTORE extensions are later sub-rungs."
verdict: NOT_YET_EVALUATED
dependencies 0 imports · 3 importers
imports: none
imported by: nx_email_mta_gate.nxnx_email_mta_io.nxnx_email_retrieve_gate.nx
structs
| none |
consts
| none |
functions
| 36 | func er_match(a: *u8, b: *u8, len: i64) -> i64 called by 1: nx_imap_reply_status |
| 41 | func er_cat(out: *u8, oi: i64, s: *u8) -> i64 called by 1: nx_pop3_build |
| 46 | func er_catn(out: *u8, oi: i64, s: *u8, len: i64) -> i64 |
| 55 | func nx_pop3_reply_ok(line: *u8, n: i64) -> i64 |
| 62 | func nx_pop3_parse_stat(line: *u8, n: i64, oc: *i64, oo: *i64) -> i64 |
| 78 | func nx_pop3_build(out: *u8, cap: i64, verb: *u8, arg: *u8, alen: i64) -> i64 |
| 88 | func nx_pop3_dedot(src: *u8, n: i64, out: *u8, cap: i64) -> i64 |
| 117 | func nx_pop3_multiline_complete(buf: *u8, n: i64) -> i64 called by 1: main |
| 126 | func nx_imap_build_tagged(out: *u8, cap: i64, tag: *u8, tl: i64, cmd: *u8, cl: i64) -> i64 |
| 138 | func nx_imap_reply_status(buf: *u8, n: i64, tag: *u8, tl: i64, out_status: *i64) -> i64 |
| 158 | func nx_imap_literal_size(line: *u8, n: i64, out: *i64) -> i64 called by 1: main |