don't sync drafts & ignore Koen's internals
This commit is contained in:
parent
1f4788fb03
commit
294c756468
@ -6,9 +6,9 @@ export DISPLAY=":0"
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Split outbox emails
|
# Split outbox emails
|
||||||
mlist /data/mail/outbox | mpick -t 'from =~~ "posteo"' | mflag -F | mrefile /data/mail/posteo/Sent
|
mlist -d /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 -d /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
|
mlist -d /data/mail/outbox | mpick -t 'from =~~ "gmail"' | mflag -F | mrefile /data/mail/gmail/Sent
|
||||||
|
|
||||||
# check for internet connection
|
# check for internet connection
|
||||||
ip route ls | grep -q '.'
|
ip route ls | grep -q '.'
|
||||||
@ -26,6 +26,7 @@ fi
|
|||||||
|
|
||||||
# Incorporate new mails and store them in the temp sequence
|
# Incorporate new mails and store them in the temp sequence
|
||||||
s="$(mktemp)"
|
s="$(mktemp)"
|
||||||
|
trap "rm '$s'" EXIT KILL
|
||||||
minc $(mdirs /data/mail) > "$s"
|
minc $(mdirs /data/mail) > "$s"
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -40,7 +41,7 @@ minc $(mdirs /data/mail) > "$s"
|
|||||||
mpick -t 'to =~ "dodona@ugent.be" && subject =~ "internal error"' < "$s" \
|
mpick -t 'to =~ "dodona@ugent.be" && subject =~ "internal error"' < "$s" \
|
||||||
| xargs grep -E -l 'course_id: (284|317|335|339|346|349|355|359|374|375|376|380|384|414)'
|
| 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"' < "$s" \
|
mpick -t 'to =~ "dodona@ugent.be" && subject =~ "internal error"' < "$s" \
|
||||||
| xargs grep -E -l 'user_id: 3'
|
| xargs grep -E -l 'user_id: (3|7078)'
|
||||||
mpick -t 'subject =~ "\[hackers\] \[slstatus\]"' < "$s"
|
mpick -t 'subject =~ "\[hackers\] \[slstatus\]"' < "$s"
|
||||||
mpick -t 'from =~ "dependabot-preview"' < "$s"
|
mpick -t 'from =~ "dependabot-preview"' < "$s"
|
||||||
|
|
||||||
|
@ -13,11 +13,12 @@ pgrep gpg-agent > /dev/null
|
|||||||
|
|
||||||
# Find new messages in feeds
|
# Find new messages in feeds
|
||||||
d="$(mktemp -d)"
|
d="$(mktemp -d)"
|
||||||
|
trap "rm -rf '$d'" EXIT KILL
|
||||||
mmkdir "$d"
|
mmkdir "$d"
|
||||||
sfeed_update > /dev/null 2>&1
|
sfeed_update > /dev/null 2>&1
|
||||||
sfeed_mbox ~/.sfeed/feeds/* | mdeliver -M -v "$d" | while read mail; do
|
sfeed_mbox ~/.sfeed/feeds/* | mdeliver -M -v "$d" | while read mail; do
|
||||||
if ! mlist /data/mail/feeds | magrep -q message-id:"$(mshow -qh message-id "$mail" | cut -d' ' -f2)"; then
|
if ! mlist /data/mail/feeds | magrep -q message-id:"$(mshow -qh message-id "$mail" | cut -d' ' -f2)"; then
|
||||||
mdeliver -X F /data/mail/feeds < "$mail" > /dev/null
|
mdeliver /data/mail/feeds < "$mail" > /dev/null
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
rm -rf "$d"
|
rm -rf "$d"
|
||||||
|
Loading…
Reference in New Issue
Block a user