afew is too complex after all
This commit is contained in:
parent
5952693319
commit
1ce49693dd
4 changed files with 60 additions and 82 deletions
154
notmuch-hooks/blacklist
Normal file
154
notmuch-hooks/blacklist
Normal file
|
@ -0,0 +1,154 @@
|
|||
bio-congress.com
|
||||
golbalpublication.online
|
||||
all.bg
|
||||
vodokanal.poltava.ua
|
||||
qingteng.xyz
|
||||
guaranten.com
|
||||
remedyonlineoa.info
|
||||
pharm2019-sa.com
|
||||
nsitysim.com
|
||||
onlinepublishers.co
|
||||
ijeert.com
|
||||
eonlinepublishers.com
|
||||
journalsres.org
|
||||
gniindia.org
|
||||
molbio2019.com
|
||||
itise.org
|
||||
iacrlrd2019.org
|
||||
hspcorporation.org
|
||||
peerreviewjournal.com
|
||||
2019cmcb.com
|
||||
iarjset.com
|
||||
ibc-congress2019.com
|
||||
drugtech-2018.com
|
||||
food-congress2019.com
|
||||
globalfest.online
|
||||
elpfuly.com
|
||||
rediffmail.com
|
||||
msgsu.edu.tr
|
||||
ecco.spgb.email
|
||||
academicaloxy.com
|
||||
sbcglobal.net
|
||||
sharonwinstonw2@gmail.com
|
||||
educagri.fr
|
||||
ac-versailles.fr
|
||||
bioscopegroup.org
|
||||
microbiologyreposit.com
|
||||
ijarcce.com
|
||||
wsztest.com
|
||||
outlookconferences.com
|
||||
cellibc2019.com
|
||||
web.imrj.online
|
||||
sib.caister.com
|
||||
gavin-publishers-group.com
|
||||
paper-longsslim@daum.net
|
||||
c2.aoamj-conferences.email
|
||||
wgc2018-congress.com
|
||||
saumail.sakarya.edu.tr
|
||||
journalinsight.org
|
||||
m.copernicuspublishing.org
|
||||
aripd.combined@gmail.com
|
||||
support.aoam.email
|
||||
hbguirui.net
|
||||
foodcongress2019.com
|
||||
congresssummit.com
|
||||
icmsquare.net
|
||||
austinpublishinggroup.us
|
||||
hindawi.com
|
||||
internationalmeeting.org
|
||||
openaccessusa.com
|
||||
journal.aoam.email
|
||||
mailpanda.com
|
||||
scientificres.org
|
||||
scifedconferences.com
|
||||
insightmeetings.net
|
||||
wgc-2019.com
|
||||
intopenaccess.com
|
||||
walla.co.il
|
||||
innofine.in
|
||||
escientificres.com
|
||||
xceptdom.com
|
||||
aoam.info
|
||||
cambridgescholars.com
|
||||
mra-journal.org
|
||||
jimsindia.org
|
||||
service.cyagenbio.com
|
||||
oatext-alerts.net
|
||||
2019ibc.com
|
||||
eclinmed.org
|
||||
innovationinfo.net
|
||||
intechopen.com
|
||||
neurologyspeakerexperts.org
|
||||
conferencesinternational.org
|
||||
oap-lifescience.org
|
||||
synpeptide.com.cn
|
||||
americaseminars.com
|
||||
oatextjournals.com
|
||||
connectcyagen.com
|
||||
oatjournals.com
|
||||
meetingsintl.com
|
||||
scientglobal.org
|
||||
research101.site
|
||||
biochemistryjournals.org
|
||||
functionalfoodcenter.com
|
||||
bio-congress.com
|
||||
oatext-news.org
|
||||
ptzjournals.com
|
||||
glazovsky.co.ua
|
||||
wcfnconference2018.com
|
||||
iacrlrd2019.com
|
||||
scientificfederation.com
|
||||
journalres.org
|
||||
bangng.org
|
||||
eurosciconmeetings.com
|
||||
renecon.eu
|
||||
kebiochem.cn
|
||||
reg-med2018.com
|
||||
edelweisspublications.info
|
||||
ibc-congress.com
|
||||
sciencescholastic.com
|
||||
journals.hindawi.com
|
||||
bioevents.net
|
||||
clinicalopenaccess.org
|
||||
easummit.net
|
||||
networkwithexpert.com
|
||||
cmcb2019.com
|
||||
eursciconevent.com
|
||||
cmedu.org
|
||||
oatextjournal.info
|
||||
alliedinternational.org
|
||||
kingfisherbiotech.com
|
||||
meettheglobalexpert.com
|
||||
tonirovany.biz.ua
|
||||
doveproofreading.com
|
||||
clinicalcasereports.editor@protonmail.ch
|
||||
scireslitoa.com
|
||||
academiapublishing.org
|
||||
editorialscience.org
|
||||
pepcon-2019.com
|
||||
oap-journals.net
|
||||
klserv.com
|
||||
keimra.org
|
||||
oap-cancer.org
|
||||
cmcb-2019.com
|
||||
rebuilding-the-raindrops.ovh
|
||||
gavinconferences.org
|
||||
iwbbio.org
|
||||
usp-pl.net
|
||||
biochemjournals.com
|
||||
sophia.isabella010@yahoo.com
|
||||
aimspress6.com
|
||||
proteinresearch.website
|
||||
linkinscience.com
|
||||
esciencemedicine.com
|
||||
cellmech-bio2018.com
|
||||
oap-journals.org
|
||||
sara.wallner78@gmail.com
|
||||
evajones290@gmail.com
|
||||
news.caister.com
|
||||
scientificfederation.info
|
||||
imrjournal.email
|
||||
oap-journals.com
|
||||
frontiermeetings.com
|
||||
submitresearch.online
|
||||
editor.factor21@daum.net
|
|
@ -1,4 +1,61 @@
|
|||
#!/bin/sh
|
||||
|
||||
afew --tag --new
|
||||
notmuch search tag:unread | cut -d' ' --complement -f1 | xargs -0 --no-run-if-empty notify-send
|
||||
addtag() { notmuch tag +"$1" -- "tag:new and ($2) and not tag:$1"; }
|
||||
archive() { notmuch tag -new -unread -- "$@" and tag:new; }
|
||||
spam() { notmuch tag -new -unread +spam -- "$@" and '(' tag:new or tag:unread or not tag:spam ')'; }
|
||||
|
||||
# Tag mails by their origin (top-level maildir)
|
||||
for maildir in /data/mail/*; do
|
||||
origin="$(basename "$maildir")"
|
||||
addtag "$origin" "folder:/$origin/"
|
||||
done
|
||||
|
||||
# Spam
|
||||
spam "subject:/^\[SPAM\]/"
|
||||
# TODO: Known spammers
|
||||
|
||||
# Some aliases
|
||||
addtag zeus "to:felixvdj@zeus.ugent.be"
|
||||
addtag dodona "to:dodona@ugent.be"
|
||||
addtag unipept "to:unipept@ugent.be"
|
||||
|
||||
# More complex tagging
|
||||
for mid in $(notmuch search --output=messages tag:new); do
|
||||
|
||||
tag=false
|
||||
|
||||
# +-tags become actual tags
|
||||
for tag in $(notmuch show --format=raw "$mid" | sed -n '/^\tfor/s/.*<[^>]*+\([^@]*\)@.*>.*/\1/p' | sort | uniq); do
|
||||
addtag "$tag" "$mid"
|
||||
tag=true
|
||||
done
|
||||
|
||||
# messages from contacts get a contact tag
|
||||
for sender in $(notmuch address --output=sender --output=address "$mid"); do
|
||||
if khard list "$sender" > /dev/null 2>&1; then
|
||||
addtag contact "$mid"
|
||||
tag=true
|
||||
fi
|
||||
done
|
||||
|
||||
# mails to posteo must have a tag
|
||||
if ! "$tag"; then
|
||||
addtag killed "$mid and tag:posteo"
|
||||
fi
|
||||
|
||||
# list ids
|
||||
for list in $(notmuch show --format=raw "$mid" | sed -n '/^List-Id:/,/^\w/p' | sed '$d' | tr '\n' ' ' | sed 's/[^<]*<// ; s/\..*//'); do
|
||||
addtag "lists" "$mid"
|
||||
addtag "lists/$list" "$mid"
|
||||
done
|
||||
done
|
||||
|
||||
# Uninteresting
|
||||
archive tag:dodona and subject:'Onderwijsinstelling aangemaakt voor .*'
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue