Using something ilke this in my mbsyncrc.
# work
IMAPAccount work
Host outlook.office365.com
Port 993
User james@placeholder.net
PassCmd "passcommand"
SSLType IMAPS
AuthMechs LOGIN
SSLVersions SSLv3
CertificateFile /usr/local/etc/openssl/cert.pem
IMAPStore work-remote
Account work
MaildirStore work-local
Path ~/Mail/work/
Inbox ~/Mail/work/inbox
Channel work
Master :work-remote:
Slave :work-local:
Patterns "*"
Create Slave
Sync All
Expunge Both
SyncState *
mbsync -D work always returns
Reading configuration file /Users/james/.mbsyncrc
Channel work
Opening master store work-remote...
Resolving outlook.office365.com... ok
Connecting to outlook.office365.com ([2a01:111:f400:5177::2]:993)...
Opening slave store work-local...
pattern '*' (effective '*'): Path, no INBOX
got mailbox list from slave:
IMAP error: unexpected EOF from outlook.office365.com ([2a01:111:f400:5177::2]:993)
Diff:
please use -Dn instead of -D.
Not sure if I'm supposed to do anything with the diff above. Here's -Dn as well as -D again without changing any configuration.
james at jamesretina in ~ ○ mbsync -Dn work
Reading configuration file /Users/james/.mbsyncrc
Channel work
Opening master store work-remote...
Resolving outlook.office365.com... ok
Connecting to outlook.office365.com ([2a01:111:f400:142a::2]:993)...
Opening slave store work-local...
IMAP error: unexpected EOF from outlook.office365.com ([2a01:111:f400:142a::2]:993)
james at jamesretina in ~ ○ mbsync -D work
Reading configuration file /Users/james/.mbsyncrc
Channel work
Opening master store work-remote...
Resolving outlook.office365.com... ok
Connecting to outlook.office365.com ([2a01:111:f400:505a::2]:993)...
Opening slave store work-local...
pattern '' (effective ''): Path, no INBOX
got mailbox list from slave:
IMAP error: unexpected EOF from outlook.office365.com ([2a01:111:f400:505a::2]:993)
right, i was being stupid - -D implies -Dn anway.
so what we're seeing is that the server immediately drops the connection after it is established, possibly during ssl negotiation.
to verify whether the problem is with ssl, try playing with openssl s_client.
an alternative explanation would be that it's related to ipv6. i can't think of a simple way to verify that with mbsync itself other than a) recompiling mbsync without ipv6 support or b) using a dns proxy which returns no AAAA records (i actually have such a config).
There's a long period of time before the '* BYE Connection is closed. 13' happens. ~30seconds to a minute.
Also tried this command. Same/Similar results as above.
$ openssl s_client -connect outlook.office365.com:993
I tried cloning
$ git clone http://git.code.sf.net/p/isync/isync isync-isync
and building off of master but get this error when running autogen. (Using OSX).
Otherwise, I'd be happy to try to get mbsync built and running without ipv6. (I'm assuming there's already some flag I can disable in configure to get a binary built without ipv6).
Last edit: James Nguyen 2016-04-23
hmm, openssl gives no indication whether it is using ipv4 or ipv6. please figure it out.
for the missing perl module, try cpan Date::Parse.
there is no configure option to disable ipv6, so you need to edit config.h (delete HAVE_IPV6), make clean, make.
I modified configure.ac and deleted where HAVE_IPV6 is defined.
Deleted below.
Steps to do install afterwards.
Also, not sure if more info will help but I also tried using offlineimap to see if a connection could be maintained. It did seem to keep a connection/download messages but definitely lots of UIValidity errors upon syncing. Included simple offineimaprc file.
Last edit: Oswald Buddenhagen 2016-05-29
uhm, now that i look again, i'm fairly sure that this is your problem:
why the @%$@$ ...?!
Yeah, wasn't sure if my config is correct. What should I change?
just delete the line.
Thanks! Working for me now. Definitely a 'doh' moment. I had that very line in my gmail config also and it didn't seem to harm anything so I never suspected it.
that's because sslv3 has been found terminally insecure only somewhat recently, and some servers still didn't disable it.
i tried it with openssl:
so it appears that there should be some report, and mbsync just fails to make one. this definitely should be fixed.
Last edit: Oswald Buddenhagen 2016-05-29
i tried a few times, but i always get a proper error message:
maybe there is still a race condition in the error path, even though i thought i fixed all related problems shortly before the 1.2.0 release ...
Is there anything I can do to help with this?
dunno. try strace and ltrace, maybe something will stand out from the logs.
Will do as time frees up.