More notmuch filter corrections. Cleaning up decrypting for offlineimap
This commit is contained in:
@@ -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 +sent -- tag:new AND folder:iocom/INBOX.Sent
|
||||||
notmuch tag +iocom +spam -- tag:new AND folder:iocom/INBOX.Spam
|
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 +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
|
notmuch tag +iocom -inbox -- folder:iocom/INBOX.Archive AND tag:inbox
|
||||||
|
|
||||||
# Gmail
|
# 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 +sent -- tag:new AND folder:gmail/sent
|
||||||
notmuch tag +gmail +spam -- tag:new AND folder:gmail/spam
|
notmuch tag +gmail +spam -- tag:new AND folder:gmail/spam
|
||||||
notmuch tag +gmail +trash -- tag:new AND folder:gmail/trash
|
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
|
notmuch tag +gmail -inbox -- tag:inbox AND tag:gmail NOT folder:gmail/INBOX
|
||||||
# TODO gmail tags
|
# TODO gmail tags
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,11 @@
|
|||||||
#import subprocess
|
|
||||||
import os
|
import os
|
||||||
import gnupg
|
import gnupg
|
||||||
|
|
||||||
home = os.environ['HOME']
|
home = os.environ['HOME']
|
||||||
gpg = gnupg.GPG(gnupghome=home+"/.gnupg", use_agent=True)
|
gpg = gnupg.GPG(gnupghome=home+"/.gnupg", use_agent=True)
|
||||||
|
|
||||||
def gmail_password():
|
def decrypt_password(file):
|
||||||
path = os.environ['HOME'] + "/.gmail-password.gpg"
|
path = home + "/" + file
|
||||||
#args = ["gpg", "-d", path]
|
|
||||||
f = open(path, 'rb')
|
f = open(path, 'rb')
|
||||||
decrypted = gpg.decrypt_file(f)
|
decrypted = gpg.decrypt_file(f)
|
||||||
return decrypted.data.strip()
|
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()
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ localfolders = ~/.mail/iocom
|
|||||||
type = IMAP
|
type = IMAP
|
||||||
remotehost = secure.emailsrvr.com
|
remotehost = secure.emailsrvr.com
|
||||||
remoteuser = dswan@insors.com
|
remoteuser = dswan@insors.com
|
||||||
remotepasseval = iocom_password()
|
remotepasseval = decrypt_password(".iocom-password.gpg")
|
||||||
realdelete = no
|
realdelete = no
|
||||||
|
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ nametrans = lambda folder: re.sub('spam', '[Gmail].Spam',
|
|||||||
[Repository GmailRemote]
|
[Repository GmailRemote]
|
||||||
type = Gmail
|
type = Gmail
|
||||||
remoteuser = dustinswan@gmail.com
|
remoteuser = dustinswan@gmail.com
|
||||||
remotepasseval = gmail_password()
|
remotepasseval = decrypt_password(".gmail-password.gpg")
|
||||||
realdelete = no
|
realdelete = no
|
||||||
sslcacertfile = /usr/local/opt/curl-ca-bundle/share/ca-bundle.crt
|
sslcacertfile = /usr/local/opt/curl-ca-bundle/share/ca-bundle.crt
|
||||||
nametrans = lambda folder: re.sub('.*Spam$', 'spam',
|
nametrans = lambda folder: re.sub('.*Spam$', 'spam',
|
||||||
|
|||||||
Reference in New Issue
Block a user