start using mblaze
This commit is contained in:
parent
cc8667004b
commit
5fe8a76095
6
local/bin/marchive
Executable file
6
local/bin/marchive
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ -z "$*" ]; then
|
||||||
|
mflag -Sf
|
||||||
|
else
|
||||||
|
mflag -Sf "$@"
|
||||||
|
fi
|
48
local/bin/mfetch
Executable file
48
local/bin/mfetch
Executable file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Split outbox emails
|
||||||
|
mlist /data/mail/outbox | mpick -t 'from =~ "posteo"' | mflag -F | mrefile /data/mail/posteo/Sent
|
||||||
|
mlist /data/mail/outbox | mpick -t 'from =~ "ugent"' | mflag -F | mrefile /data/mail/ugent/Sent
|
||||||
|
mlist /data/mail/outbox | mpick -t 'from =~ "gmail"' | mflag -F | mrefile /data/mail/gmail/Sent
|
||||||
|
|
||||||
|
# Sync email
|
||||||
|
mbsync -a
|
||||||
|
|
||||||
|
# No further processing if there are no new mails
|
||||||
|
if ! mdirs /data/mail | mlist -N | grep -q .; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Incorporate new mails and store them in the temp sequence
|
||||||
|
minc $(mdirs /data/mail) | mflag -F | mseq -S
|
||||||
|
|
||||||
|
{
|
||||||
|
# Ignores
|
||||||
|
mpick -t 'to =~ "unipept@ugent.be" && subject ~~ "*Mysql2::Error::ConnectionError*"'
|
||||||
|
mpick -t 'to =~ "dodona@ugent.be" && from =~ "KlasCement"'
|
||||||
|
mpick -t 'to =~ "dodona@ugent.be" && from =~ "logcheck system account"'
|
||||||
|
mpick -t 'to =~ "dodona@ugent.be" && subject =~ "A request took"'
|
||||||
|
mpick -t 'to =~ "dodona@ugent.be" && subject =~ "Onderwijsinstelling aangemaakt voor"'
|
||||||
|
mpick -t 'to =~ "dodona@ugent.be" && subject =~ "Een gebruiker kon niet inloggen"'
|
||||||
|
mpick -t 'to =~ "dodona@ugent.be" && subject =~ "Invalid or unknown LTI provider"'
|
||||||
|
mpick -t 'to =~ "dodona@ugent.be" && subject =~ "Faraday::ConnectionFailed"'
|
||||||
|
mpick -t 'to =~ "dodona@ugent.be" && subject =~ "internal error"' \
|
||||||
|
| xargs grep -E -l 'course_id: (284|317|335|339|346|349|355|359|374|375|376|380|384|414)'
|
||||||
|
mpick -t 'to =~ "dodona@ugent.be" && subject =~ "internal error"' \
|
||||||
|
| xargs grep -E -l 'user_id: 3'
|
||||||
|
mpick -t 'subject =~ "\[hackers\] \[slstatus\]"'
|
||||||
|
mpick -t 'from =~ "dependabot-preview"'
|
||||||
|
|
||||||
|
# Muted mails
|
||||||
|
for muted in $(cat ~/.mblaze/muted); do
|
||||||
|
mpick -t '"references" =~~ "'"$muted"'"'
|
||||||
|
done
|
||||||
|
} | sort | uniq | marchive
|
||||||
|
|
||||||
|
# Clear muted sequence
|
||||||
|
#mseq -f < ~/.mblaze/muted | mpick -t 'date < "'"$(date -I -d '1 month ago')"'"' | sponge ~/.mblaze/muted
|
||||||
|
|
||||||
|
# Show the remaining new mails
|
||||||
|
mseq -f | mlist -F | mseq -S
|
||||||
|
mscan
|
3
local/bin/minbox
Executable file
3
local/bin/minbox
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
mdirs /data/mail/ | mlist -F | msort -d | mthread | mseq -S
|
||||||
|
mscan
|
7
local/bin/mmute
Executable file
7
local/bin/mmute
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ -z "$*" ]; then
|
||||||
|
exec mmute .
|
||||||
|
else
|
||||||
|
mseq "$@" | mshow -qh message-id:references:in-reply-to | grep -o '<[^>]*>' | cat ~/.mblaze/muted - | sort | uniq | sponge ~/.mblaze/muted
|
||||||
|
marchive "$@"
|
||||||
|
fi
|
2
local/bin/mspam
Executable file
2
local/bin/mspam
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
mflag -STf "$@"
|
16
local/bin/mtodo
Executable file
16
local/bin/mtodo
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
f="$(mktemp)"
|
||||||
|
vis - > "$f" <<HERE
|
||||||
|
Date: $(date --rfc-email)
|
||||||
|
To: todo@localhost
|
||||||
|
From: todo@localhost
|
||||||
|
Subject:
|
||||||
|
Message-Id: $(mgenmid)
|
||||||
|
User-Agent: mtodo
|
||||||
|
|
||||||
|
|
||||||
|
HERE
|
||||||
|
|
||||||
|
[ ! -s "$f" ] && exit
|
||||||
|
|
||||||
|
mdeliver /data/mail/todo < "$f"
|
4
mblaze/.gitignore
vendored
Normal file
4
mblaze/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
cur
|
||||||
|
muted
|
||||||
|
seq
|
||||||
|
seq.old
|
1
mblaze/filter
Normal file
1
mblaze/filter
Normal file
@ -0,0 +1 @@
|
|||||||
|
text/html: w3m -dump -o display_link_number=1 -I $PIPE_CHARSET -T text/html
|
5
mblaze/profile
Normal file
5
mblaze/profile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Local-Mailbox: Felix Van der Jeugt <felix.vanderjeugt@posteo.net>
|
||||||
|
Alternate-Mailboxes: Felix Van der Jeugt <Felix.VanderJeugt@UGent.be>,Felix Van der Jeugt <felix.vanderjeugt@ugent.be>,Felix Van der Jeugt <felix.vanderjeugt@gmail.com>,Felix Van der Jeugt <felix.vanderjeugt@12urenloop.be>
|
||||||
|
Sendmail: msmtp
|
||||||
|
FQDN: mantle
|
||||||
|
Outbox: /data/mail/outbox
|
Loading…
Reference in New Issue
Block a user