Search code examples
mbsync

mbsync near side box unable to open


I'm trying to get company mail running under gmail to sync with mbsync which is under [email protected] domain. I used mailctl for authentication, which seems to work because I'm seeing some errors like Error: channel myacc: near side box [name of a label I made in gmail] cannot be opened. so at least it got to my labels (I'm also getting similar errors on my personal gmail).

But unlike my personal email which seems to be doing something (although I haven't actually seen emails yet), this account gives the following error:

Socket error: secure read from imap.gmail.com (64.233.184.108:993): error:0A000126:SSL routines::unexpected eof while reading

This is the config for it:

IMAPAccount myacc
# Address to connect to
Host imap.gmail.com
User [...]
AuthMechs XOAUTH2
# To store the password in an encrypted file use PassCmd instead of Pass
PassCmd "mailctl access myacc"
#
# Use SSL
SSLType IMAPS
# The following line should work. If you get certificate errors, uncomment the two following lines and read the "Troubleshooting" section.
CertificateFile /etc/ssl/certs/ca-certificates.crt
#CertificateFile ~/.cert/imap.gmail.com.pem
#CertificateFile ~/.cert/Equifax_Secure_CA.pem

IMAPStore myacc-remote
Account myacc

MaildirStore myacc-local
SubFolders Verbatim
# The trailing "/" is important
Path ~/.mail/myacc/
Inbox ~/.mail/myacc/Inbox

Channel myacc
Far :myacc-remote:
Near :myacc-local:
Patterns *
# Automatically create missing mailboxes, both locally and on the server
Create Both

Any ideas what I'm doing wrong?


Solution

  • After a lot of messing around, what I called here as myacc actually had @ in it, which seems to be a big no-no. Removing it and using an underscore works.