citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

notmuch-poll (1856B)


      1 #!/usr/bin/env sh
      2 
      3 notmuchcmd () {
      4   echo "notmuch" "$@"
      5   $(notmuch "$@")
      6 }
      7 
      8 # bulk bs
      9 notmuchcmd tag +filed +bulk 'folder:".Bulk"'
     10 
     11 # sent
     12 notmuchcmd tag +sent tag:inbox and not tag:sent and folder:".Sent"
     13 
     14 # me
     15 #notmuchcmd tag +to-me not tag:to-me and and tag:inbox and \(to:jackbox55@gmail.com or to:jb55@jb55.com\)
     16 #notmuchcmd tag +flagged tag:inbox and not tag:flagged and to:jackbox55+star@gmail.com
     17 
     18 # except if someone mentions e
     19 notmuchcmd tag +flagged -busy -filed tag:inbox and '(tag:list and tag:to-me) or to:mention@noreply.github.com or author@noreply.github.com or to:ci_activity@noreply.github.com or to:review_requested@noreply.github.com or to:comment@noreply.github.com or (subject:jb55 and tag:github) or ((usdt or ebpf or bpf or tracepoints) and bitcoin)'
     20 
     21 # don't really need this in my inbox
     22 notmuchcmd tag +filed to:push@noreply.github.com
     23 
     24 # spam
     25 notmuchcmd tag -inbox from:Giveaway or 'from:"BOOM OF SALES"' or 'from:Ray Ban' or from:.lat or from:163.com or from:.homes or from:.bio or from:.biz or from:.world or from:.boats or from:.bond or from:.cfd or from:.xyz or from:.pro or from:.beauty or from:.fun or from:.shop or from:.yeah.net or from:.sbs or from:.one or from:.bet or from:.best or from:.info or from:.online or from:.ltd or from:.live or from:.club or from:.life or from:.top or from:126.com or from:.wiki or from:.monster or from:.ru or from:.mom or from:.us or from:.click or from:.today or from:.autos or from:.co or from:.buzz or from:.quest or 'from:Home Depot' or from:resistthemainstream.com or from:sugarmat or 'from:Malware Alert' or 'from:Lowes' or from:IServiced and tag:inbox
     26 
     27 # not spam
     28 notmuchcmd tag +inbox -spam +flagged "bitcoin wizard" and tag:spam
     29 
     30 # phone mail
     31 notmuchcmd tag -inbox tag:inbox and '(folder:".Archive" or folder:".Trash" or folder:".Archives")'
     32 
     33 printf "notmuch tagging done.\n"