Sync gmail using mbsync (isync) on debian linux using XOAUTH2
5
votes
0
answers
2572
views
I am trying to sync my mails from gmail to my local mail server using mbsync . But i keep getting an error
Error: SASL(-4): no mechanism available: No worthy mechs found
Here is my .mbsyncrc
file:
#IMAP server you wish to copy mails from.
IMAPAccount original
Host imap.gmail.com
User username@gmail.com
AuthMechs XOAUTH2
Pass access_token_recieved_from_google
UseIMAPS yes
CertificateFile /etc/ssl/certs/ca-certificates.crt
# The IMAP server you wish to copy mails to.
IMAPAccount target
Host local.mail.server.host
User local_user
Pass somepass
AuthMechs LOGIN
UseIMAPS yes
CertificateFile /etc/ssl/certs/ca-certificates.crt
# Link IMAP server to remote used below. Note Account is set to 'original' now -- we'll be set it to 'target' later!
IMAPStore my-remote
Account original
# The local storage we'll be using. Note the trailing slash at the end of the Path!
MaildirStore my-local
Path ~/mail/
Inbox ~/mail/INBOX/
# This is where the magic happens. Note Sync is set to 'Pull' now -- we'll set it to 'Push' later!
Channel my-channel
Master :my-remote:
Slave :my-local:
Patterns *
Create Both
Sync Pull
SyncState *
system: Linux stretch 4.9.0-7-amd64 #1 SMP Debian 4.9.110-1 (2018-07-05) x86_64 GNU/Linux
mbsync --version isync 1.2.1
looks like mbsync isn't recognizing XOAUTH2
for keyword AuthMechs
. If i change the AuthMech type to LOGIN
, i get an invalid credentials
error. (makes sense, i put in an auth token in place of the password).
Any ideas?
Asked by SomeGuyFortune
(151 rep)
Sep 5, 2018, 03:45 AM
Last activity: Feb 25, 2025, 02:56 PM
Last activity: Feb 25, 2025, 02:56 PM