alpha
Login
or
Join now
jcollie.dev
/
zig-smtp
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
An SMTP client and server library for Zig implementing RFC 5321.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
zig-smtp
/
nix
2 files
at
b370fc0e8411a3e3d6bbf961c4a6b8d5c7d078d1
Jeffrey C. Ollie
Add implicit TLS on the server side
13d ago
cd70da4f
interop-test.nix
Add implicit TLS on the server side Server.Options.starttls becomes tls: ?TlsOptions with a mode field: .starttls keeps the RFC 3207 behavior (advertise, 220, upgrade, state reset) and .implicit performs the tls.zig server handshake before the greeting (SMTPS, port 465 style). Both paths share one upgradeToTls helper; in implicit mode STARTTLS is never advertised and the command gets 502. Breaking rename for Server.Options at version 0.0.0. The serve CLI grows --implicit-tls (requires --tls-cert/--tls-key) and its flag parser now supports valueless flags. Verified locally with openssl s_client (greeting arrives inside the TLS channel) and our own --tls client, plus a STARTTLS regression check. The VM interop test adds an implicit-TLS zsmtp server and a swaks --tlsc subtest against it; all 16 subtests pass. The Status list is complete: TLS in both modes on both sides, AUTH, streaming bodies, and MAIL parameter validation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012HBHFhoTYa8TU9GLwobfbx
1 week ago
package.nix
Add Nix package and NixOS VM interop tests nix/package.nix builds zsmtp with zig_0_16 and runs the unit tests; the tls.zig dependency is provided offline by materializing it into the project-local zig-pkg/<hash>/ directory with only the files from the dependency's paths list, so Zig's content hash matches. nix/interop-test.nix exercises zsmtp against third-party implementations in one VM: - zsmtp client -> Postfix: plaintext (25), STARTTLS (25), implicit TLS (465, submissions wrapper mode), verified via alice's maildir spool - swaks -> zsmtp server: plaintext and STARTTLS (snakeoil EC cert), verified via the server's journal Exposed as packages.zsmtp/default and checks.{zsmtp,interop}. Postfix on NixOS delivers maildir-style (mail_spool_directory has a trailing slash), so assertions grep the directory recursively, with 60s timeouts to fail fast. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012HBHFhoTYa8TU9GLwobfbx
2 weeks ago