Skip to content

Instantly share code, notes, and snippets.

@mntmn
Created May 2, 2019 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mntmn/1f6e9c0d2cb36ad0412c67e83f7a08de to your computer and use it in GitHub Desktop.
Save mntmn/1f6e9c0d2cb36ad0412c67e83f7a08de to your computer and use it in GitHub Desktop.
mntmn's fetch-mail script for notmuch/offlineimap
#!/bin/bash
# purge deleted mail!
notmuch search '--output=files' tag:deleted | xargs -l rm -f
# sync and fill address book
offlineimap -u basic -q && notmuch new && notmuch tag +sent -- folder:Sent and not tag:sent && nottoomuch-addresses.sh --update
notmuch tag -inbox -unread -- tag:sent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment