about summary refs log tree commit diff stats
path: root/notmuch
diff options
context:
space:
mode:
authorCase Duckworth2023-01-30 17:33:06 -0600
committerCase Duckworth2023-01-30 17:33:06 -0600
commit1d562af8927d932bc3329de3b06c94a966047238 (patch)
treeacb2c460fbb8d01473f38f4de426c4879c7ae11a /notmuch
parentDeclare mode (diff)
downloadetc-1d562af8927d932bc3329de3b06c94a966047238.tar.gz
etc-1d562af8927d932bc3329de3b06c94a966047238.zip
Add a bunch of stuff
Forgot I had to `git add -f' these!
Diffstat (limited to 'notmuch')
-rw-r--r--notmuch/config103
-rwxr-xr-xnotmuch/default/hooks/post-insert14
-rwxr-xr-xnotmuch/default/hooks/post-new22
-rwxr-xr-xnotmuch/default/hooks/pre-new15
-rw-r--r--notmuch/post-new.tags34
5 files changed, 188 insertions, 0 deletions
diff --git a/notmuch/config b/notmuch/config new file mode 100644 index 0000000..be90ebc --- /dev/null +++ b/notmuch/config
@@ -0,0 +1,103 @@
1# .notmuch-config - Configuration file for the notmuch mail system
2#
3# For more information about notmuch, see https://notmuchmail.org
4
5# Database configuration
6#
7# The only value supported here is 'path' which should be the top-level
8# directory where your mail currently exists and to where mail will be
9# delivered in the future. Files should be individual email messages.
10# Notmuch will store its database within a sub-directory of the path
11# configured here named ".notmuch".
12#
13[database]
14path=/home/case/var/mail
15hook_dir=/home/case/etc/notmuch/default/hooks
16
17# User configuration
18#
19# Here is where you can let notmuch know how you would like to be
20# addressed. Valid settings are
21#
22# name Your full name.
23# primary_email Your primary email address.
24# other_email A list (separated by ';') of other email addresses
25# at which you receive email.
26#
27# Notmuch will use the various email addresses configured here when
28# formatting replies. It will avoid including your own addresses in the
29# recipient list of replies, and will set the From address based on the
30# address to which the original email was addressed.
31#
32[user]
33name=Case Duckworth
34primary_email=case@acdw.net
35other_email=acdw@fastmail.com;acdw@acdw.net;breadpunk@acdw.net;caseandrachel19@acdw.net;caseduckworth@acdw.net;comments@acdw.net;lists@acdw.net;me@acdw.net;pam@acdw.net;ring@acdw.net;sonn-it@acdw.net;webring@acdw.net;caseduckworth@fastmail.com;loosepoops@fea.st;case@clickheredigital.com;case@thebryc.org;case.duckworth@papertutors.co
36
37# Configuration for "notmuch new"
38#
39# The following options are supported here:
40#
41# tags A list (separated by ';') of the tags that will be
42# added to all messages incorporated by "notmuch new".
43#
44# ignore A list (separated by ';') of file and directory names
45# that will not be searched for messages by "notmuch new".
46#
47# NOTE: *Every* file/directory that goes by one of those
48# names will be ignored, independent of its depth/location
49# in the mail store.
50#
51[new]
52tags=inbox;unread;
53ignore=.mbsyncstate;.isyncuidmap.db;.uidvalidity;/.*[.](json|lock|bak|journal|new|drafts)$/;
54
55# Search configuration
56#
57# The following option is supported here:
58#
59# exclude_tags
60# A ;-separated list of tags that will be excluded from
61# search results by default. Using an excluded tag in a
62# query will override that exclusion.
63#
64[search]
65exclude_tags=deleted;spam;Spam;Trash;sent
66
67# Show configuration
68[show]
69extra_headers=List-Post;
70
71# Maildir compatibility configuration
72#
73# The following option is supported here:
74#
75# synchronize_flags Valid values are true and false.
76#
77# If true, then the following maildir flags (in message filenames)
78# will be synchronized with the corresponding notmuch tags:
79#
80# Flag Tag
81# ---- -------
82# D draft
83# F flagged
84# P passed
85# R replied
86# S unread (added when 'S' flag is not present)
87#
88# The "notmuch new" command will notice flag changes in filenames
89# and update tags, while the "notmuch tag" and "notmuch restore"
90# commands will notice tag changes and update flags in filenames
91#
92[maildir]
93synchronize_flags=true
94
95# Cryptography related configuration
96#
97# The following option is supported here:
98#
99# gpg_path
100# binary name or full path to invoke gpg.
101#
102[crypto]
103gpg_path=gpg
diff --git a/notmuch/default/hooks/post-insert b/notmuch/default/hooks/post-insert new file mode 100755 index 0000000..b983dfc --- /dev/null +++ b/notmuch/default/hooks/post-insert
@@ -0,0 +1,14 @@
1#!/usr/bin/env bash
2# Notmuch post-insert hook
3
4# This hook is invoked by the insert command after the message has
5# been delivered, added to the database, and initial tags have
6# been applied. The hook will not be run if there have been any
7# errors during the message delivery; what is regarded as success‐
8# ful delivery depends on the --keep option.
9
10# Typically this hook is used to perform additional query-based
11# tagging on the delivered messages.
12
13# TODO: In notmuch v0.35, the location of this hook becomes configurable.
14# When I have that installed, I want to move this to ~/.config/notmuch.
diff --git a/notmuch/default/hooks/post-new b/notmuch/default/hooks/post-new new file mode 100755 index 0000000..744c334 --- /dev/null +++ b/notmuch/default/hooks/post-new
@@ -0,0 +1,22 @@
1#!/usr/bin/env bash
2# Notmuch post-new hook
3
4# This hook is invoked by the new command after new messages have
5# been imported into the database and initial tags have been ap‐
6# plied. The hook will not be run if there have been any errors
7# during the scan or import.
8
9# Typically this hook is used to perform additional query-based
10# tagging on the imported messages.
11
12# TODO: In notmuch v0.35, the location of this hook becomes configurable.
13# When I have that installed, I want to move this to ~/.config/notmuch.
14
15# Update tags based on folders
16for fdir in ~/var/mail/fastmail/* ; do
17 if [[ $(basename "$fdir") != "INBOX" ]]; then
18 notmuch tag +$(basename "$fdir") -inbox -- "folder:${fdir##$HOME/var/mail/}"
19 fi
20done
21
22notmuch tag --batch --input="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch/post-new.tags"
diff --git a/notmuch/default/hooks/pre-new b/notmuch/default/hooks/pre-new new file mode 100755 index 0000000..443e3f2 --- /dev/null +++ b/notmuch/default/hooks/pre-new
@@ -0,0 +1,15 @@
1#!/usr/bin/env bash
2# Notmuch pre-new hook
3
4# This hook is invoked by the new command before scanning or im‐
5# porting new messages into the database. If this hook exits with
6# a non-zero status, notmuch will abort further processing of the
7# new command.
8
9# Typically this hook is used for fetching or delivering new mail
10# to be imported into the database.
11
12# TODO: In notmuch v0.35, the location of this hook becomes configurable.
13# When I have that installed, I want to move this to ~/.config/notmuch.
14
15/home/case/usr/scripts/syncmail
diff --git a/notmuch/post-new.tags b/notmuch/post-new.tags new file mode 100644 index 0000000..e9dd2f7 --- /dev/null +++ b/notmuch/post-new.tags
@@ -0,0 +1,34 @@
1# -*- mode: notmuch-tags -*-
2# Notmuch post-new tags --- see <man:notmuch-tag(1)>
3
4# Account tags
5+personal -- path:fastmail/**
6
7+clickhere +work -- path:clickhere/**
8-inbox -unread -- tag:TaskIQ
9-inbox -unread -- from:get@myreports.email or from:mail@semrush.com
10-inbox -unread -- from:"/Semrush App Center Team/"
11-inbox -- to:seo@clickheredigital.com
12
13+bryc +work -- path:bryc/*
14
15+paper +work -- path:paper/**
16-inbox -unread -- path:paper/** and subject:"Shift Transfer Request"
17
18# Spam
19+spam -new -- folder:/.*[Ss]pam.*/ or folder:/.*[Jj]unk.*/
20
21# Auto-archive
22+archive -new -inbox -- not tag:unread and date:..6M
23
24# Sent mail
25+sent -new -unread -inbox -- tag:new from:/.*@acdw\.net/ or from:case@clickheredigital.com or from:case@thebryc.org
26
27# Calendar invites
28+invite -- attachment:ics
29
30# Draft
31-inbox -unread -- tag:draft or folder:draft
32
33# Etc, etc, etc.
34+dracula -unread -- from:draculadaily@substack.com