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
554c3edbccb1be5df04dc543707b538cdde423b8
Jeffrey C. Ollie
Add SMTP AUTH to client and server
13d ago
a2d430d9
interop-test.nix
Add SMTP AUTH to client and server Client (RFC 4954/4616/2195): - Extensions.auth parses the advertised mechanism list (including the legacy AUTH= form) into plain/login/cram_md5 flags - authLogin and authCramMd5 join authPlain; CRAM-MD5 is verified against the RFC 2195 example vector - authenticate() picks PLAIN, then LOGIN, then CRAM-MD5; a 535 surfaces as error.AuthenticationFailed with the reply in last_reply Server: - an optional authenticate handler callback enables AUTH PLAIN and LOGIN: initial responses, 334 challenges, "*" cancellation, bad base64 (501), unknown mechanism (504), re-auth/mid-transaction (503) - Options.require_auth rejects MAIL with 530 until authenticated; STARTTLS resets auth state CLI: send grew --user/--password/--auth-method, serve grew --auth user:pass (implies require_auth). VM interop additions: zsmtp client authenticates to Exim via PLAIN and LOGIN (its plaintext authenticator; CRAM-MD5 is not compiled into nixpkgs exim) with a wrong-password rejection, and swaks authenticates to the auth-required zsmtp server via PLAIN and LOGIN with wrong-password and unauthenticated rejections. 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
1 week ago