code wiki / _hdl_build / nx_smtp_probe.nx
nx_smtp_probe.nx
buildroot/runtime/_hdl_build/nx_smtp_probe.nx
about
nx_smtp_probe.nx -- SOVEREIGN outbound-SMTP reachability probe (zero shell, zero curl).
THE make-or-break fact for full self-hosted MX (EMAIL-D3 first act): can this network open
TCP to a real Gmail MX on port 25 and receive the "220" SMTP banner? Many ISPs silently
block outbound 25 while 443/587 work -- in that case no amount of MTA code will ever
deliver to Gmail and the operator must get the port opened (or move the mail host).
Battery (default): gmail-smtp-in.l.google.com:25 + aspmx.l.google.com:25 (two independent
Google MXes = the real test) vs smtp.gmail.com:587 + :465 (submission CONTROLS -- normally
never ISP-blocked; they discriminate "port-25 block" from "no outbound at all").
Composes the proven substrate: nx_dns_resolve_default (sovereign DNS) + BSD sockets with
sys_set_socket_timeout(10s) so a blackholed port FAILS GRACEFULLY, never hangs.
usage: nx_smtp_probe [host port] (no args = the default battery)
verdict: exit 0 iff at least one :25 target returned an SMTP 220 banner (OPEN);
exit 1 otherwise (BLOCKED-OR-UNREACHABLE). Appends knowledge/status/smtp_probe.log.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_connect.nxnx_dns_resolve_a_record.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 19 | func sp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 20 | func sp_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: sp_probe |
| 21 | func sp_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 22 | func sp_putn(v: i64) -> i64 |
| 32 | func sp_ip(packed: i64) -> i64 |
| 39 | func sp_atoi(s: *u8) -> i64 called by 1: main |
| 49 | func sp_sockaddr(out: *u8, packed: i64, port: i64) -> i64 called by 1: sp_probe |
| 64 | func sp_probe(host: *u8, port: i64) -> i64 |
| 100 | func main(argc: i64, argv: *i64) -> i64 |