commit 60f4a6c5a5514a61dcbef6ee1ea102be5c669730
parent d24f632f5965479e765c12778869eb83c0e22518
Author: Nathaniel Chappelle <nathaniel@chappelle.dev>
Date: Sat, 24 Jan 2026 14:05:48 -0800
Just setting up some notmuch stuff
Diffstat:
4 files changed, 70 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1 +1,2 @@
test/
+PROJECT
diff --git a/NOTMUCH b/NOTMUCH
@@ -0,0 +1,12 @@
+This project uses notmuch, an answer to Sup.
+
+Notmuch is now configured in a file in the home directory named .notmuch-config.
+You can either edit that file directly or run "notmuch setup", though for
+stamail I would just copy the example file and edit that to your specs. To
+choose an alternate configuration location, set ${NOTMUCH_CONFIG}.
+
+The next step is to run "notmuch new" which will create a database that indexes
+all of your mailing-list. Depending on the amount of mail you have the initial indexing
+process can take a long time, so expect that. Also, the resulting database will
+require roughly the same amount of storage space as your current collection of
+email. So please ensure you have sufficient storage space available now.
diff --git a/notmuch-config b/notmuch-config
@@ -0,0 +1,19 @@
+built_with.compact=true
+built_with.field_processor=true
+built_with.retry_lock=true
+built_with.sexp_queries=true
+database.autocommit=8000
+database.backup_dir=/home/binker/dev/stamail/test/.notmuch/backups
+database.hook_dir=/home/binker/dev/stamail/test/.notmuch/hooks
+database.mail_root=/home/binker/dev/stamail/test
+database.path=/home/binker/dev/stamail/test
+index.as_text=
+maildir.synchronize_flags=true
+new.ignore=
+new.tags=unread;inbox
+search.authors_matched_separator=|
+search.authors_separator=,
+search.exclude_tags=
+user.name=alice example
+user.primary_email=alice@example.com
+
diff --git a/setup-mock-maildir b/setup-mock-maildir
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+# mock-maildir.sh
+
+MAILDIR="./test"
+mkdir -p "$MAILDIR"/{cur,new,tmp}
+
+# Helper function
+create_msg() {
+ local msgid="$1"
+ local subject="$2"
+ local from="$3"
+ local inreplyto="$4"
+ local date="$5"
+
+ local filename="$MAILDIR/cur/$msgid:2,S"
+
+ cat > "$filename" << EOF
+From: $from
+Date: $date
+Subject: $subject
+Message-ID: <$msgid@example.com>
+${inreplyto:+In-Reply-To: <$inreplyto@example.com>}
+${inreplyto:+References: <$inreplyto@example.com>}
+
+This is a test message about $subject.
+EOF
+}
+
+# Create a simple thread
+create_msg "msg001" "Feature proposal" "alice@example.com" "" "Mon, 20 Jan 2025 10:00:00 +0000"
+create_msg "msg002" "Re: Feature proposal" "bob@example.com" "msg001" "Mon, 20 Jan 2025 11:00:00 +0000"
+create_msg "msg003" "Re: Feature proposal" "charlie@example.com" "msg002" "Mon, 20 Jan 2025 12:00:00 +0000"
+
+# Another thread
+create_msg "msg004" "Bug report" "david@example.com" "" "Tue, 21 Jan 2025 09:00:00 +0000"
+create_msg "msg005" "Re: Bug report" "alice@example.com" "msg004" "Tue, 21 Jan 2025 10:00:00 +0000"
+
+echo "Test maildir created at $MAILDIR"