#!/bin/bash set -e -u tmpdir="$(mktemp -d)" export NOTMUCH_DATABASE="$tmpdir" notmuch --config '' new > /dev/null mkdir -p "$NOTMUCH_DATABASE"/{cur,new,tmp} notmuch --config '' insert > /dev/null notmuch --config '' show '*' | grep ^From: rm -rf "tmpdir"