Strange error but synching anyway with gmail

Rainer M Krug Rainer at krugs.de
Wed Sep 21 16:05:17 BST 2016


Nicolas Sebrecht <nicolas.s-dev at laposte.net> writes:

> On Wed, Sep 21, 2016 at 12:29:16PM +0200, Rainer M Krug wrote:
>> Rainer M Krug <Rainer at krugs.de> writes:
>> 
>> > Hi
>> >
>> > I get the following error when authorizing with gmail. The strange thing
>> > is that the sync works afterwards anyway. Any suggestions?
>
> I guess the XOAUTH2 authentication fails and offlineimap fallbacks to
> another authentication method.

makes sense.

>
>> > ,----
>> > | ...
>> > | XOAUTH2 authentication failed: AUTHENTICATE command error: BAD
>> > | ['Client aborted AUTHENTICATE command. 24mb158715449edv']. Data:
>> > | DKIJ2 AUTHENTICATE XOAUTH2
>> > | ...
>> > | XOAUTH2 authentication failed: AUTHENTICATE command error: BAD
>> > | ['Client aborted AUTHENTICATE command. i20mb364599303ede']. Data:
>> > | CGCN2 AUTHENTICATE XOAUTH2
>> > | ...
>> > | XOAUTH2 authentication failed: AUTHENTICATE command error: BAD
>> > | ['Client aborted AUTHENTICATE command. o13mb189629961edo']. Data:
>> > | NCJO2 AUTHENTICATE XOAUTH2
>> > | ...
>> > `----
>>
>> Forgot to ad my .offlineimaprc file - here it is:
>> 
>> ,----
[snip:  some config (34 lines)]>
> I bet you have other configuration options enabled. You should paste all
> of them and strip your private data. ,-)

OK - here is my complete config - you asked for it - I only deleted the
comments. I don't think I deleted something related before...:

,----
| [general]
| accounts = Gmail
| maxsyncaccounts = 3
| ## write to disk using fsync()
| fsync = true
| ## ignore readonly warning message
| ignore-readonly = no
| pythonfile = ~/.offlineimap.py
| 
| [Account Gmail]
| localrepository  = LocalRMKrugGMAIL
| remoterepository = RemoteRMKrugGMAIL
| ######
| status_backend = sqlite
| ######
| postsynchook = /usr/local/bin/notmuch new
| ######
| autorefresh = 2
| quick = 10
| ######
| 
| 
| [Account iCloud]
| localrepository =   LocaliCloud
| remoterepository =  RemoteiCloud
| ######
| status_backend = sqlite
| ######
| autorefresh = 2
| quick = 10
| ######
| 
| 
| [Repository RemoteRMKrugGMAIL]
| type = Gmail
| sslcacertfile = /usr/local/etc/openssl/cert.pem
| ######
| remoteuser = USERNAME
| remotepasseval = get_keychain_pass(account="RMKrugGmailOfflineimap")
| ######
| maxconnections = 5
| ######
| nametrans = lambda foldername: 'RMKrugGMAIL.' + foldername
| ######
| keepalive = 60
| holdconnectionopen = no
| ######
| 
| [Repository LocalRMKrugGMAIL]
| type = IMAP
| ###### 
| preauthtunnel = /usr/local/opt/dovecot/libexec/dovecot/imap -o mail_location=maildir:$HOME/Maildir
| holdconnectionopen = yes
| ######
| nametrans = lambda folder: re.sub('^RMKrugGMAIL.', '', folder)
| ######
| folderfilter = lambda folder: folder.startswith('RMKrugGMAIL')
| ######
| keepalive = 60
| holdconnectionopen = no
| ######
| 
| [Repository LocalSUN]
| type = IMAP
| preauthtunnel = /usr/local/opt/dovecot/libexec/dovecot/imap -o mail_location=maildir:$HOME/Maildir
| holdconnectionopen = yes
| nametrans = lambda folder: re.sub('^SUN.', '', folder)
| folderfilter = lambda folder: folder.startswith('SUN')
| keepalive = 60
| holdconnectionopen = yes
| 
| [Repository RemoteSUN]
| type = IMAP
| remotehost = imap.sun.ac.za
| remoteuser = USERNAME
| remotepasseval = get_keychain_pass(account="rkrugSUNOfflineimap")
| ######
| nametrans = lambda foldername: 'SUN.' + foldername
| ######
| folderfilter = lambda folder: folder in ['INBOX']
| ######
| keepalive = 60
| holdconnectionopen = yes
| 
| [Repository LocaliCloud]
| type = IMAP
| preauthtunnel = /usr/local/opt/dovecot/libexec/dovecot/imap -o mail_location=maildir:$HOME/Maildir
| holdconnectionopen = yes
| folderfilter = lambda folder: folder.startswith('iCloud')
| nametrans = lambda folder: re.sub('^iCloud.', '', folder)
| keepalive = 60
| holdconnectionopen = yes
| 
| [Repository RemoteiCloud]
| type = IMAP
| remotehost = imap.mail.me.com
| port = 993
| ssl = yes
| sslcacertfile = /usr/local/etc/openssl/cert.pem
| remoteuser = USERNAME
| remotepasseval = get_keychain_pass(account="rainer.friCloudOfflineimap")
| nametrans = lambda foldername: 'iCloud.' + foldername
| ######
| keepalive = 60
| holdconnectionopen = yes
`----

Hope this helps,

Rainer

>
[snip:  some more config (13 lines)]


-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 454 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20160921/5d7b1eeb/attachment-0003.sig>


More information about the OfflineIMAP-project mailing list