From 2024cdcdc3cf3f9a99866a3215d63de34b3f0d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Mon, 7 Dec 2020 11:07:13 +0100 Subject: Clean mail tagger for work mails --- bin/tagmail | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'bin') 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) -- cgit v1.2.3