我正在尝试使用以下命令将我的邮件从 gmail 同步到我的本地邮件服务器MB同步。但我不断收到错误Error: SASL(-4): no mechanism available: No worthy mechs found
这是我的.mbsyncrc
文件:
#IMAP server you wish to copy mails from.
IMAPAccount original
Host imap.gmail.com
User [email protected]
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 *
系统:Linux stretch 4.9.0-7-amd64 #1 SMP Debian 4.9.110-1 (2018-07-05) x86_64 GNU/Linux
mbsync --版本isync 1.2.1
看起来 mbsync 无法识别XOAUTH2
关键字AuthMechs
。如果我将 AuthMech 类型更改为LOGIN
,我会收到invalid credentials
错误。 (有道理,我用身份验证令牌代替密码)。
有任何想法吗?