2023-04-19 01:01:07 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-04-15 15:56:23 +02:00
|
|
|
# Script to be run after mailboxes have been synchronized
|
|
|
|
# Expects `notmuch` in the PATH
|
|
|
|
|
|
|
|
# Index new mail
|
|
|
|
notmuch new
|
|
|
|
|
|
|
|
# Remove the inbox tag from all mails not inside any inbox
|
|
|
|
notmuch tag -inbox not path:'/.*/Inbox/'
|
|
|
|
|
|
|
|
# Add tags for messages in their respective folders
|
|
|
|
notmuch tag +archive path:'/.*/Archive/'
|
|
|
|
|
|
|
|
notmuch tag +junk path:'/.*/Spam/'
|
|
|
|
|
|
|
|
notmuch tag +trash path:'/.*/Trash/'
|
|
|
|
notmuch tag +trash path:'/.*/Gel&APY-scht/'
|
|
|
|
notmuch tag +trash path:'/.*/Papierkorb/'
|
|
|
|
|
|
|
|
notmuch tag +sent path:'/.*/Sent/'
|
|
|
|
notmuch tag +sent path:'/.*/Gesendet/'
|
|
|
|
|
|
|
|
notmuch tag +draft path:'/.*/Drafts/'
|
|
|
|
notmuch tag +draft path:'/.*/Entw&APw-rfe/'
|
|
|
|
|
|
|
|
# Tag all mail according to their accounts
|
|
|
|
notmuch tag +gmx path:'/GMX/'
|
|
|
|
notmuch tag +uni path:'/UNI/'
|
|
|
|
notmuch tag +schulverwalter path:'/schulverwalter/'
|