check mail composition before splitting outbox

This commit is contained in:
Felix Van der Jeugt 2024-08-14 11:26:37 +02:00 committed by Felix Van der Jeugt
parent dbbb350080
commit 0d925de716

View File

@ -5,6 +5,12 @@ export DISPLAY=":0"
set -e set -e
# Don't sync mails while composing
! pgrep -f mcom > /dev/null
! pgrep -f mfwd > /dev/null
! pgrep -f mbnc > /dev/null
! pgrep -f mrep > /dev/null
# Split outbox emails # Split outbox emails
mlist -d /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
@ -14,12 +20,6 @@ ip route ls | grep -q '.'
# check if the gpg-agent is running # check if the gpg-agent is running
pgrep gpg-agent > /dev/null pgrep gpg-agent > /dev/null
# Don't sync mails while composing
! pgrep -f mcom > /dev/null
! pgrep -f mfwd > /dev/null
! pgrep -f mbnc > /dev/null
! pgrep -f mrep > /dev/null
# Sync email # Sync email
mbsync -a -q || true mbsync -a -q || true