aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2023-01-01 18:07:13 +0000
committerYann Herklotz <git@yannherklotz.com>2023-01-01 18:07:13 +0000
commita8f535d3653fcd6da017b32a3328d69fc8650f5d (patch)
treed8cb9cae6b7e7042d92808cdcc5303e3e51be045
parentf52aa8ed3d309e6d6841eeafef1d50aeff4b99b2 (diff)
downloaddotfiles-a8f535d3653fcd6da017b32a3328d69fc8650f5d.tar.gz
dotfiles-a8f535d3653fcd6da017b32a3328d69fc8650f5d.zip
Add tag-mail
-rwxr-xr-xnotmuch/.local/bin/tag-mail40
1 files changed, 40 insertions, 0 deletions
diff --git a/notmuch/.local/bin/tag-mail b/notmuch/.local/bin/tag-mail
new file mode 100755
index 0000000..172a685
--- /dev/null
+++ b/notmuch/.local/bin/tag-mail
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+date
+mbsync imperial mailbox
+
+notmuch new
+
+notmuch tag --batch <<EOF
+
++imperial -- tag:new and folder:/^imperial/
++mailbox -- tag:new and folder:/^mailbox/
+
++archive -- tag:new and (folder:imperial/Archive or folder:imperial/Archive1 or folder:mailbox/Archive)
+
+-new +sent -- tag:new and (folder:"imperial/Sent Items" or folder:mailbox/Sent)
+-new +deleted -- tag:new and (folder:"imperial/Deleted Items" or folder:mailbox/Trash)
+
+-new +cron -- tag:new and (from:anacron or from:"cron daemon")
+
+-new +callforpaper -- tag:new and ((subject:call and (subject:paper or subject:session)) or from:saiconference.com)
+
+-new +ieee -- tag:new and from:/^IEEE/
+
+-new +imperial-noise -- tag:new and (from:"library notices" or from:"Fownes, Joanna" or from:"Victoria Scott" or from:"Graduate School <graduate.school@imperial.ac.uk>" or from:"ACM Learning Center" or from:"CGCU Secretary" or from:"DoCSoc" or subject:"[HiPEAC Members]" or (subject:"Your Casual pay form for" or subject:"claim for") or from:"email.teams.microsoft.com")
+
+-new +newyorker -- tag:new and from:"newyorker@newsletter.newyorker.com"
+
++me -- tag:new and (to:yann@ymhg.org or to:yann@yannherklotz.com)
++git -- tag:new and to:git@yannherklotz.com
+
+-new +amazon.co.uk -- tag:new and to:amazon.co.uk@ymhg.org
+
++list -- tag:new and List:*
+-new +list/ntg-context -- tag:new and List:ntg-context.ntg.nl
+-new +list/dev-context -- tag:new and List:dev-context.ntg.nl
+-new +list/emacs-devel -- tag:new and List:emacs-devel.gnu.org
+
+-new +inbox -- tag:new
+
+EOF