diff --git a/notmuch-post-new b/notmuch-post-new index 8dd7399..0702720 100755 --- a/notmuch-post-new +++ b/notmuch-post-new @@ -10,6 +10,7 @@ notmuch tag +iocom +draft -- tag:new AND folder:iocom/INBOX.Drafts notmuch tag +iocom +sent -- tag:new AND folder:iocom/INBOX.Sent notmuch tag +iocom +spam -- tag:new AND folder:iocom/INBOX.Spam notmuch tag +iocom +trash -- tag:new AND folder:iocom/INBOX.Trash +notmuch tag +iocom -- tag:new AND folder:iocom/INBOX.Archive notmuch tag +iocom -inbox -- folder:iocom/INBOX.Archive AND tag:inbox # Gmail @@ -18,6 +19,7 @@ notmuch tag +gmail +draft -- tag:new AND folder:gmail/drafts notmuch tag +gmail +sent -- tag:new AND folder:gmail/sent notmuch tag +gmail +spam -- tag:new AND folder:gmail/spam notmuch tag +gmail +trash -- tag:new AND folder:gmail/trash +notmuch tag +gmail -- tag:new AND folder:gmail/archive notmuch tag +gmail -inbox -- tag:inbox AND tag:gmail NOT folder:gmail/INBOX # TODO gmail tags diff --git a/offlineimap.py b/offlineimap.py index 962aef5..dc0cbf3 100644 --- a/offlineimap.py +++ b/offlineimap.py @@ -1,29 +1,11 @@ -#import subprocess import os import gnupg home = os.environ['HOME'] gpg = gnupg.GPG(gnupghome=home+"/.gnupg", use_agent=True) -def gmail_password(): - path = os.environ['HOME'] + "/.gmail-password.gpg" - #args = ["gpg", "-d", path] +def decrypt_password(file): + path = home + "/" + file f = open(path, 'rb') decrypted = gpg.decrypt_file(f) return decrypted.data.strip() - - #try: - #return subprocess.check_output(args).rstrip() - #except subprocess.CalledProcessError: - #return "".strip() - -def iocom_password(): - path = os.environ['HOME'] + "/.iocom-password.gpg" - f = open(path, 'rb') - decrypted = gpg.decrypt_file(f) - return decrypted.data.strip() - #args = ["gpg", "-d", path] - #try: - #return subprocess.check_output(args).rstrip() - #except subprocess.CalledProcessError: - #return "".strip() diff --git a/offlineimaprc b/offlineimaprc index 85a832a..085ad02 100644 --- a/offlineimaprc +++ b/offlineimaprc @@ -16,7 +16,7 @@ localfolders = ~/.mail/iocom type = IMAP remotehost = secure.emailsrvr.com remoteuser = dswan@insors.com -remotepasseval = iocom_password() +remotepasseval = decrypt_password(".iocom-password.gpg") realdelete = no @@ -39,7 +39,7 @@ nametrans = lambda folder: re.sub('spam', '[Gmail].Spam', [Repository GmailRemote] type = Gmail remoteuser = dustinswan@gmail.com -remotepasseval = gmail_password() +remotepasseval = decrypt_password(".gmail-password.gpg") realdelete = no sslcacertfile = /usr/local/opt/curl-ca-bundle/share/ca-bundle.crt nametrans = lambda folder: re.sub('.*Spam$', 'spam',