Fixing offline imap password stuff
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import subprocess
|
||||
|
||||
def gmail_password():
|
||||
path = "~/.gmail_password.pgp"
|
||||
args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path]
|
||||
path = "/Users/dustinswan/.gmail_password.gpg"
|
||||
args = ["gpg", "-d", path]
|
||||
try:
|
||||
return subprocess.check_output(args)
|
||||
return subprocess.check_output(args).rstrip()
|
||||
except subprocess.CalledProcessError:
|
||||
return "".strip()
|
||||
|
||||
@@ -23,7 +23,7 @@ nametrans = lambda folder: {'drafts': '[Gmail]/Drafts',
|
||||
maxconnections = 1
|
||||
type = Gmail
|
||||
remoteuser = dustinswan@gmail.com
|
||||
remetepasseval = gmail_password()
|
||||
remotepasseval = gmail_password()
|
||||
realdelete = no
|
||||
nametrans = lambda folder: {'[Gmail]/Drafts': 'drafts',
|
||||
'[Gmail]/Sent Mail': 'sent',
|
||||
|
||||
Reference in New Issue
Block a user