aboutsummaryrefslogtreecommitdiffstats
path: root/src/htmlbuilder.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-23 20:39:06 +0200
committerDanilo M. <danix@danix.xyz>2026-08-23 20:39:06 +0200
commitf7948d98fe09c551856b04ba8a473dbd40649dc3 (patch)
treea3757a879fb49ad0b797c1f7ce062801bd80f516 /src/htmlbuilder.h
parenta9d1cf73a91b5eef79a9722ec9921c97b9ec5c81 (diff)
downloadqtmaildir-f7948d98fe09c551856b04ba8a473dbd40649dc3.tar.gz
qtmaildir-f7948d98fe09c551856b04ba8a473dbd40649dc3.zip
feat(hooks): own the notmuch hooks, and keep sent mail out of the inbox
The post-new hook and its rule store move here from the companion mailctl project, which is being retired. Nothing else was shared between the two, so this is a plain move: mailrules.py is stdlib-only and post-new imports only it. With that in hand, the hook learns the one thing it could not know before. notmuch's new.tags applies `inbox` to every file it indexes, and it cannot tell an arrival from the copy this application files into a sent folder after a send, so sent mail turned up in the inbox view and in any hand-typed tag:inbox search. Drafts arrived the same way, through the composer's autosave. 786 messages were affected on the developer's own index. qtmaildirconf.py reads the sent and drafts folders out of qtmaildir.conf, so adding an account fixes itself. Reading the application's own config is not the cross-repo coupling it would have been last week: this repo owns the hook now. Three properties are load-bearing: - it is NOT a relaxation of PROTECTED_REMOVALS, which is about a rule removing `inbox` from mail whose provenance the hook cannot judge. Here the provenance is the file's own path, and `inbox` was never true of it. - only `inbox`. maildir.synchronize_flags is true, so removing `unread` would rewrite Maildir filenames and reach the server on the next mbsync. - an empty folder list means NOTHING, never an empty query, which notmuch reads as "match everything". A system with no qtmaildir config must be left alone rather than have every new message stripped. Trash is deliberately not in the list: Delete leaves `inbox` on a trashed message so Restore can put it back where it came from. The three Python suites run under ctest rather than beside it as scripts someone remembers to run, since this code tags real mail unattended on every sync. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2koFevoSxTLhfexJTZWQd
Diffstat (limited to 'src/htmlbuilder.h')
0 files changed, 0 insertions, 0 deletions