From 8e13717228c7a8ef37c5b2811b5cd2fac9f22c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Sun, 9 Aug 2020 12:08:54 +0200 Subject: Import personal email processing --- .local/bin/tagmail.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 .local/bin/tagmail.sh (limited to '.local/bin') diff --git a/.local/bin/tagmail.sh b/.local/bin/tagmail.sh new file mode 100755 index 0000000..ea3616b --- /dev/null +++ b/.local/bin/tagmail.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +if [[ -z $DBUS_SESSION_BUS_ADDRESS ]]; then + source /tmp/.Xdbus +fi + +# delete mail +notmuch search --output=files tag:deleted | xargs -I {} rm -v "{}" + +# Mail download +if [ -z "$1" ] +then + echo "syncing all mailboxes" + mbsync -a +else + echo "syncing $1 mailbox" + mbsync "$1" +fi + +# Notmuch tagging +notmuch new + +notmuch tag +ci -new -- from:travis-ci.com or from:travis-ci.org or from:appveyor.com or from:circleci.com +notmuch tag +ci -new -- from:mg.gitlab.com and subject:Pipeline +notmuch tag +CMK-JIRA -inbox -new -- from:infra@mathias-kettner.de or from:jira@tribe29.com +notmuch tag +alle-mk -new -- to:alle@mathias-kettner.de to:technik@tribe29.com +notmuch tag +cmk-commits -new -- to:cmk-internal-commits@mathias-kettner.de and subject:\[cmk\] +notmuch tag +mkde-commits -new -- to:cmk-internal-commits@mathias-kettner.de and subject:\[mkde\] +notmuch tag +cmc-commits -new -- to:cmk-internal-commits@mathias-kettner.de and subject:\[cmc\] +notmuch tag +cma-commits -new -- to:cma-commits@mathias-kettner.de and subject:\[cma\] +notmuch tag +immonews -new -- from:immobilienscout24.de +notmuch tag +immonews/communications -new -- from:nachrichten.immobilienscout24.de or subject:Kontaktaufnahme and tag:immonews +notmuch tag +socialnews -new -- from:facebookmail.com or from:mail.instagram.com +notmuch tag +linkedin +socialnews -new -- from:linkedin.com +notmuch tag +promotions -- from:newsletter +notmuch tag +toastmasters -- toastmaster NOT from:info@meetup.com + +notmuch tag +sms -inbox -- folder:hi_pers/SMS +notmuch tag +calls -inbox -- folder:hi_pers/Calls + +# afew tagging +afew --tag --new -v + +notmuch tag -inbox -- tag:lists -- cgit v1.2.3