summaryrefslogtreecommitdiff
path: root/dotfiles/Mail
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-05-19 09:02:17 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-05-19 09:02:17 -0400
commit56236c0e1aed4166fac8bd5908f28ddc5f928c96 (patch)
tree1580707df3639a61e10b1d3bfb6c7e57e560c446 /dotfiles/Mail
parent1e579064aed9f32061e5edbe1c693cab21f0ce75 (diff)
Update dotfiles with new Guile-based installer.
Diffstat (limited to 'dotfiles/Mail')
-rwxr-xr-xdotfiles/Mail/.notmuch/hooks/post-new44
-rwxr-xr-xdotfiles/Mail/.notmuch/hooks/pre-new22
2 files changed, 66 insertions, 0 deletions
diff --git a/dotfiles/Mail/.notmuch/hooks/post-new b/dotfiles/Mail/.notmuch/hooks/post-new
new file mode 100755
index 0000000..b829d40
--- /dev/null
+++ b/dotfiles/Mail/.notmuch/hooks/post-new
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# Mail that I sent doesn't need to be put in the inbox
+notmuch tag -new -- from:davet@gnu.org OR from:davet@fsf.org OR \
+ from:dthompson2@worcester.edu
+
+# Commit notifications
+notmuch tag -new +commits -- subject:Office-commits \
+ OR from:account for gitolite OR to:www-commits@gnu.org
+
+# Fencepost updates
+notmuch tag -new +fencepost -- from:diffmon@gnu.org
+
+# GNU webmasters
+notmuch tag -new +webmasters -- from:webmasters@gnu.org \
+ OR from:webmasters-comment@gnu.org
+
+# FSF sysadmins
+notmuch tag -new +fsfsys -- from:sysadmin@gnu.org \
+ OR from:sysadmin-comment@gnu.org
+
+# Linode
+notmuch tag -new +linode -- from:billing@linode.com
+
+# Mark spam
+notmuch tag -new +spam -- folder:FSF/INBOX.Spam OR folder:WSU/[Gmail].Spam
+notmuch tag -new +spam -- from:john.pozzi@comcast.net # Do not feed
+
+# Loomio
+notmuch tag +loomio -new -- from:notifications@loomio.org
+
+# Remaining new mail goes to the inbox
+notmuch tag -new +inbox +unread -- tag:new
+
+# GNU mailing lists
+notmuch tag -inbox +guix -- to:guix-devel@gnu.org OR to:bug-guix@gnu.org
+notmuch tag -inbox +guile -- to:guile-devel@gnu.org OR to:guile-user@gnu.org
+notmuch tag -inbox +gnu -- to:gnu-prog-discuss@gnu.org
+notmuch tag -inbox +mediagoblin -- to:devel@mediagoblin.org
+notmuch tag -inbox +gnu-webmasters -- to:www-discuss@gnu.org
+
+# Remove inbox tag from all mail in archive
+notmuch tag -inbox -- folder:WSU/Archive AND tag:inbox
+notmuch tag -inbox -- folder:FSF/INBOX.Archive AND tag:inbox
diff --git a/dotfiles/Mail/.notmuch/hooks/pre-new b/dotfiles/Mail/.notmuch/hooks/pre-new
new file mode 100755
index 0000000..db83fa4
--- /dev/null
+++ b/dotfiles/Mail/.notmuch/hooks/pre-new
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Delete mail
+#notmuch search --output=files tag:deleted | xargs -rl rm
+
+# Move marked spam to spam folder
+notmuch search --output=files path:FSF/** AND NOT folder:FSF/INBOX.Spam \
+ AND tag:spam | xargs -I '{}' mv '{}' ~/Mail/FSF/INBOX.Spam/cur
+
+# Delete spam after one week
+notmuch tag +deleted -- tag:spam AND date:..one_week
+
+# Delete commits after one month
+notmuch tag +deleted -- tag:commits AND date:..one_month
+
+# Move mail from inbox to archive
+notmuch search --output=files --duplicate=1 folder:WSU/INBOX AND NOT tag:inbox \
+ | xargs -I '{}' mv '{}' ~/Mail/WSU/Archive/cur
+notmuch search --output=files --duplicate=1 folder:FSF/INBOX AND NOT tag:inbox \
+ | xargs -I '{}' mv '{}' ~/Mail/FSF/INBOX.Archive/cur
+
+exit 0