From fc7d0e20f9014345515ab34dd11b0cfdd540174c Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Thu, 21 Nov 2019 15:12:59 +0100 Subject: [PATCH] Filter dependabot and syscheck mails, no notifications --- notmuch-hooks/post-new | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/notmuch-hooks/post-new b/notmuch-hooks/post-new index abdd29c..5234854 100755 --- a/notmuch-hooks/post-new +++ b/notmuch-hooks/post-new @@ -59,15 +59,18 @@ done addtag github "from:notifications@github.com" # Uninteresting -archive tag:dodona and subject:'Onderwijsinstelling aangemaakt voor .*' -archive tag:github and subject:dodona-edu/dodona and thread:{from:dependabot} +archive tag:dodona subject:'Onderwijsinstelling aangemaakt voor .*' +archive tag:dodona from:'logcheck system account' +archive tag:github thread:{from:dependabot} \ + -subject:Security \ + -to:mention@noreply.github.com \ + -to:assign@noreply.github.com \ + -to:review_requested@noreply.github.com \ + -to:security_alert@noreply.github.com # And stay down! #addtag killed "thread:{tag:killed}" -# Notify about new messages -notmuch search tag:new | cut -d' ' --complement -f1 | xargs -0 --no-run-if-empty notify-send - # Inbox remaining not-spam addtag inbox "not tag:spam" notmuch tag -new -- tag:new @@ -79,4 +82,4 @@ for mutetag in $(notmuch search --output=tags tag:muted | grep 'muted/'); do if [ "$today" -gt "$until" ]; then notmuch tag -muted -"$mutetag" +inbox -- tag:"$mutetag" fi -done +done \ No newline at end of file