diff options
Diffstat (limited to 'offlineimap')
-rw-r--r-- | offlineimap/.offlineimap.py | 11 | ||||
-rw-r--r-- | offlineimap/.offlineimaprc | 8 |
2 files changed, 6 insertions, 13 deletions
diff --git a/offlineimap/.offlineimap.py b/offlineimap/.offlineimap.py index fb4f66e..9ae081e 100644 --- a/offlineimap/.offlineimap.py +++ b/offlineimap/.offlineimap.py @@ -1,4 +1,5 @@ from offlineimap import imaputil +import keyring def lld_flagsimap2maildir(flagstring): @@ -39,13 +40,5 @@ imaputil.flagsmaildir2imap = lld_flagsmaildir2imap imaputil.flagsimap2maildir = lld_flagsimap2maildir -def getuser(host): - import netrc - mynet = netrc.netrc() - return mynet.authenticators(host)[0] - - def getpassword(host): - import netrc - mynet = netrc.netrc() - return mynet.authenticators(host)[2] + return keyring.get_password('offlineimap', host) diff --git a/offlineimap/.offlineimaprc b/offlineimap/.offlineimaprc index af59f59..07a2893 100644 --- a/offlineimap/.offlineimaprc +++ b/offlineimap/.offlineimaprc @@ -18,8 +18,8 @@ nametrans = lambda folder: re.sub('^Inbox$', 'INBOX', folder.capitalize()) [Repository ryuslash.org-remote] type = IMAP remotehost = imap.alwaysdata.com -remoteusereval = getuser("imap.alwaysdata.com") -remotepasseval = getpassword("imap.alwaysdata.com") +remoteuser = 'tom@ryuslash.org' +remotepasseval = getpassword("ryuslash") nametrans = lambda folder: folder.lower() [Account picturefix] @@ -71,8 +71,8 @@ nametrans = lambda folder: re.sub('^inbox$', 'INBOX', re.sub('^drafts$', '[Gm [Repository gmail-remote] type = Gmail -remoteusereval = getuser("imap.google.com") -remotepasseval = getpassword("imap.google.com") +remoteuser = "ryuslash@gmail.com" +remotepasseval = getpassword("gmail") realdelete = no cert_fingerprint = 687687a7f2dc166baf58221ff7a42f1683d0d164 folderfilter = lambda folder: folder in ['INBOX', '[Gmail]/Drafts', '[Gmail]/Sent Mail', '[Gmail]/Trash'] |