Skip to content

Instantly share code, notes, and snippets.

@mkazlauskas
Created March 25, 2016 15:10
Show Gist options
  • Save mkazlauskas/ebbe7bd0e74c56365d07 to your computer and use it in GitHub Desktop.
Save mkazlauskas/ebbe7bd0e74c56365d07 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Workaround to set mail as read using astroid
set -e
echo "[mailsync]: hack"
ls ~/Mail | while read x; do
notmuch tag +unread +reunread -- path:$x/INBOX/new/** and not tag:unread
notmuch tag -unread -reunread -- tag:reunread
done
echo "[mailsync]: offlineimap"
offlineimap -o -u quiet
echo "[mailsync]: notmuch new"
notmuch new
# TODO: use 'new' tag to show notification
echo "[mailsync]: done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment