#!/bin/sh
#
# Save a copy of an email in Sent, then send it with sendmail.
set -e
TMP=$(mktemp -d)
cat > "$TMP/message"
notmuch insert --folder=Sent < "$TMP/message"
sendmail -f [email protected] "$@" < "$TMP/message"
rm -r -- "$TMP"
Alternatively, Ian Mertz's survey might be a bit more accessible than the original catalytic paper: https://iuuk.mff.cuni.cz/~iwmertz/papers/m23.reusing_space.p...