aboutsummaryrefslogtreecommitdiff
path: root/email/dot-config/notmuch/default
diff options
context:
space:
mode:
Diffstat (limited to 'email/dot-config/notmuch/default')
-rw-r--r--email/dot-config/notmuch/default/config39
-rwxr-xr-xemail/dot-config/notmuch/default/hooks/post-new10
2 files changed, 49 insertions, 0 deletions
diff --git a/email/dot-config/notmuch/default/config b/email/dot-config/notmuch/default/config
new file mode 100644
index 0000000..eeacdcc
--- /dev/null
+++ b/email/dot-config/notmuch/default/config
@@ -0,0 +1,39 @@
+[database]
+path=/home/moreka/.local/share/mail
+
+[user]
+name=Mohammad Reza Karimi
+primary_email=moreka@mit.edu
+
+[new]
+tags=new
+ignore=.mbsyncstate;.uidvalidity;.mbsyncstate.new;.mbsyncstate.lock
+
+[search]
+exclude_tags=deleted;spam
+
+# Maildir compatibility configuration
+#
+# The following option is supported here:
+#
+# synchronize_flags Valid values are true and false.
+#
+# If true, then the following maildir flags (in message filenames)
+# will be synchronized with the corresponding notmuch tags:
+#
+# Flag Tag
+# ---- -------
+# D draft
+# F flagged
+# P passed
+# R replied
+# S unread (added when 'S' flag is not present)
+#
+# The "notmuch new" command will notice flag changes in filenames
+# and update tags, while the "notmuch tag" and "notmuch restore"
+# commands will notice tag changes and update flags in filenames
+
+[maildir]
+synchronize_flags=true
+
+# vim: ft=confini
diff --git a/email/dot-config/notmuch/default/hooks/post-new b/email/dot-config/notmuch/default/hooks/post-new
new file mode 100755
index 0000000..063888b
--- /dev/null
+++ b/email/dot-config/notmuch/default/hooks/post-new
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# remove "unread" from "replied"
+notmuch tag -unread -new -- tag:replied
+
+# tag all "new" messages "inbox" and "unread"
+notmuch tag +inbox +unread -new -- '(tag:new and folder:mit/INBOX)'
+
+# tag my replies as "sent"
+notmuch tag -new -unread +sent -- '(from:"moreka@mit.edu*" not to:"moreka@mit.edu*" not tag:archived)'