Skip to content

Instantly share code, notes, and snippets.

@apmanol
Last active November 4, 2018 10:50
Show Gist options
  • Save apmanol/ea57bee90b0e623925b85cebd25aa8d3 to your computer and use it in GitHub Desktop.
Save apmanol/ea57bee90b0e623925b85cebd25aa8d3 to your computer and use it in GitHub Desktop.
.offlineimaprc
[general]
# List of accounts to be synced, separated by a comma.
accounts = yahoo
[Account yahoo]
# Identifier for the local repository; e.g. the maildir to be synced via IMAP.
localrepository = yahoo-local
remoterepository = yahoo-remote
# Minutes between syncs
#autorefresh = 1 # In minutes not seconds. Doesn't work on OS X. Don't use since we use wrapper 'offlineimap-load'
# Identifier for the remote repository; i.e. the actual IMAP, usually non-local.
remoterepository = yahoo-remote
# Status cache. Default is plain, which eventually becomes huge and slow.
#status_backend = sqlite
# Maxage of mail to synchronize in days
maxage = 90
[Repository yahoo-local]
type = Maildir
localfolders = ~/Maildir-yahoo
[Repository yahoo-remote]
type = IMAP
# This only works in continuous mode since using '-o' option runs and exits by nature
keepalive = 100
holdconnectionopen = yes
remotehost = imap.mail.yahoo.com
remoteuser = <user>
remotepass = <password>
remoteport = 993
ssl = yes
maxconnections = 1
realdelete = no
folderfilter = lambda foldername: foldername in ['Inbox', 'Drafts', 'Sent', 'Spam', 'Notes', 'Archive']
#cert_fingerprint = c8d50e4f236438c4910aeb11d9bc588502032637
#cert_fingerprint = 4cd4ac5d6e0eea0f7be3382e2ef3a9289089e33e
#sslcacertfile = /etc/ssl/certs/ca-certificates.crt
sslcacertfile = /etc/pki/tls/certs/ca-bundle.crt
@apmanol
Copy link
Author

apmanol commented Nov 4, 2018

$ offlineimap  -1 -d imap -f Archive -o 
OfflineIMAP 7.1.5
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (bundled), Python v2.7.15, OpenSSL 1.1.0i-fips  14 Aug 2018
Debug mode: Forcing to singlethreaded.
Now debugging for imap: IMAP protocol debugging
Now debugging for : Other offlineimap related sync messages
Account sync yahoo:
 [imap]: Using authentication mechanisms ['GSSAPI', 'XOAUTH2', 'CRAM-MD5', 'PLAIN', 'LOGIN']
 *** Processing account yahoo
 Establishing connection to imap.mail.yahoo.com:993 (yahoo-remote)
 [imap]: yahoo-remote: level 'tls_compat', version 'None'
 [imap]: Attempting XOAUTH2 authentication
 [imap]: Attempting PLAIN authentication
 [imap]: __plainhandler: returning xxxxxxxx@yahoo.com.au(passwd hidden for log)
 PLAIN authentication failed: [AUTHENTICATIONFAILED] AUTHENTICATE Invalid credentials
 [imap]: Attempting LOGIN authentication
 [imap]: Attempting IMAP LOGIN authentication
 LOGIN authentication failed: [AUTHENTICATIONFAILED] LOGIN Invalid credentials
 ERROR: All authentication types failed:
	PLAIN: [AUTHENTICATIONFAILED] AUTHENTICATE Invalid credentials
	LOGIN: [AUTHENTICATIONFAILED] LOGIN Invalid credentials
 ['  File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 283, in syncrunner\n    self.__sync()\n', '  File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 359, in __sync\n    remoterepos.getfolders()\n', '  File "/usr/lib/python2.7/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders\n    imapobj = self.imapserver.acquireconnection()\n', '  File "/usr/lib/python2.7/site-packages/offlineimap/imapserver.py", line 558, in acquireconnection\n    self.__authn_helper(imapobj)\n', '  File "/usr/lib/python2.7/site-packages/offlineimap/imapserver.py", line 431, in __authn_helper\n    "failed:\\n\\t%s"% msg, OfflineImapError.ERROR.REPO)\n']
 *** Finished account 'yahoo' in 0:23
 ERROR: Exceptions occurred during the run!
 ERROR: All authentication types failed:
	PLAIN: [AUTHENTICATIONFAILED] AUTHENTICATE Invalid credentials
	LOGIN: [AUTHENTICATIONFAILED] LOGIN Invalid credentials
 
Traceback:
  File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 283, in syncrunner
    self.__sync()
  File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 359, in __sync
    remoterepos.getfolders()
  File "/usr/lib/python2.7/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders
    imapobj = self.imapserver.acquireconnection()
  File "/usr/lib/python2.7/site-packages/offlineimap/imapserver.py", line 558, in acquireconnection
    self.__authn_helper(imapobj)
  File "/usr/lib/python2.7/site-packages/offlineimap/imapserver.py", line 431, in __authn_helper
    "failed:\n\t%s"% msg, OfflineImapError.ERROR.REPO)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment