[notmuch] Properly tag emails from mailing lists
authorAmin Bandali <amin@aminb.org>
Mon, 31 Jul 2017 00:32:40 +0000 (20:32 -0400)
committerAmin Bandali <amin@aminb.org>
Mon, 31 Jul 2017 00:32:40 +0000 (20:32 -0400)
I tried to do this with `afew` but couldn't get it
to work reliably, so I just went with `notmuch tag`.

afew/.config/afew/config
notmuch/mail/.notmuch/hooks/post-new

index 7cf90f6..5d4d556 100644 (file)
@@ -2,7 +2,29 @@
 [SpamFilter]
 #[ClassifyingFilter]
 [KillThreadsFilter]
 [SpamFilter]
 #[ClassifyingFilter]
 [KillThreadsFilter]
-[ListMailsFilter]
+#[ListMailsFilter]
 [ArchiveSentMailsFilter]
 sent_tag = sent
 [InboxFilter]
 [ArchiveSentMailsFilter]
 sent_tag = sent
 [InboxFilter]
+
+#[Filter.1]
+#query = 'folder:amin/lists/.haskell-cafe'
+#tags = +lists;+lists/haskell-cafe
+#message = lists/haskell-cafe
+
+#[Filter.2]
+#query = 'folder:amin/lists/.haskell-weekly'
+#tags = +lists;+lists/haskell-weekly
+#message = lists/haskell-weekly
+
+#[Filter.3]
+#query = 'folder:amin/lists/.hackernewsletter'
+#tags = +lists;+lists/hackernewsletter
+#message = lists/hackernewsletter
+
+
+#[FolderNameFilter]
+#folder_blacklist = Inbox
+#maildir_separator = /.
+#folder_transforms = Drafts:draft Junk:spam Trash:deleted Sent:sent Archive:archive lists/haskell-cafe:lists/haskell-cafe
+
index 4be7355..63b2e2f 100755 (executable)
@@ -1,2 +1,8 @@
 #!/bin/sh
 afew -tn
 #!/bin/sh
 afew -tn
+
+# apply tags to lists
+notmuch tag +lists +lists/deepspec -- folder:amin/lists/.deepspec
+notmuch tag +lists +lists/haskell-cafe -- folder:amin/lists/.haskell-cafe
+notmuch tag +lists +lists/haskell-weekly -- folder:amin/lists/.haskell-weekly
+notmuch tag +lists +lists/hackernewsletter -- folder:amin/lists/.hackernewsletter