aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorÓscar Nájera <hi@oscarnajera.com>2020-12-07 11:07:13 +0100
committerÓscar Nájera <hi@oscarnajera.com>2020-12-07 11:07:13 +0100
commit2024cdcdc3cf3f9a99866a3215d63de34b3f0d8b (patch)
tree9aeb7ca7608ae1cc1ab6e1c3c2b41c067b670515 /bin
parentc8f743484bf9cc9a081bc5ecbb3bbc60ae73a34c (diff)
downloaddotfiles-2024cdcdc3cf3f9a99866a3215d63de34b3f0d8b.tar.gz
dotfiles-2024cdcdc3cf3f9a99866a3215d63de34b3f0d8b.tar.bz2
dotfiles-2024cdcdc3cf3f9a99866a3215d63de34b3f0d8b.zip
Clean mail tagger for work mails
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tagmail14
1 files changed, 4 insertions, 10 deletions
diff --git a/bin/tagmail b/bin/tagmail
index e6b4c50..9ca1771 100755
--- a/bin/tagmail
+++ b/bin/tagmail
@@ -161,7 +161,7 @@
(define tag-rules
'(("+ci" "from:travis-ci.com or from:travis-ci.org or from:appveyor.com or from:circleci.com or from:mg.gitlab.com and subject:Pipeline")
- ("+CMK-JIRA -inbox" "from:infra@mathias-kettner.de or from:jira@tribe29.com")
+ ("+CMK-JIRA -inbox" "from:infra@mathias-kettner.de or (from:jira and not subject:\"mentioned you\")")
("+slack" "from:slack.com")
("+alle-mk" "to:alle@mathias-kettner.de to:technik@tribe29.com")
("+cmk-commits" "to:cmk-internal-commits@mathias-kettner.de")
@@ -198,7 +198,9 @@
(help (single-char #\h) (value #f))
(all (value #f))
(dry-run (single-char #\n) (value #f))))
- (options (cons '(mail-repo . "/home/titan/.mail/")
+ (options (cons (cons 'mail-repo (string-append
+ (passwd:dir (getpwuid (geteuid)))
+ "/.mail/" ))
(getopt-long args option-spec)))
(account (if (null? (assq-ref options '())) "hi_pers" (car (assq-ref options '())))))
(delete-email-files! options)
@@ -220,11 +222,3 @@
(clear-inbox options ffi-db)
(tag-spam options ffi-db "tag:inbox")
(notmuch_database_destroy ffi-db))))
-
-(let* ((ffi-db (nm-open-database "/home/titan/.mail/" 0))
- (query (nm-query-db ffi-db "subject:^.FYI"))
- (subjects (nm-iter messages (nm-result-messages query)
- (lambda (msg) (nm-header msg "subject")))))
-
- (notmuch_database_destroy ffi-db)
- subjects)