Documentation
¶
Overview ¶
Command imaprec turns a session trace from maild (MAILD_IMAP_TRACE) into a replay script that can be checked in (docs/design/testing.md, transcript replay). It cuts the session after one command, can keep only the newest messages each mailbox fetched, and replaces what the account's mail says (names, addresses, subjects, bodies, mailbox names) with stable fakes while keeping the protocol's shape. It refuses to write a script in which a word it replaced still appears.
go run ./tools/imaprec -through T14 -keep 5 -note "Gmail, first sync" -o script.txt TRACE
Scripts that continue one another (a second session of the same account) must share their fakes: scrub them with the same -keyfile, made once with head -c 32 /dev/urandom and never checked in.