When I run mbsync against my Kerberos-enabled Dovecot installation, it fails with a «buffer too small» error: $ mbsync mail C: 0/1 B: 0/0 M: +0/0 *0/0 #0/0 S: +0/0 *0/0 #0/0Fatal: buffer too small. Please report a bug. zsh: abort mbsync mail This is very reproducible for me, the components are dovecot with gssapi enabled, samba4 as the Kerberos server and mbsync with libsasl2-modules-gssapi-mit installed. An easy workaround is to increase the size of the IMAP command buffer, I can provide a patch for that if you'd like.
please increase the buffer to whatever size works and then send me the output of an -l session with the -D option, so i can see where i made the wrong assumption.
]] Oswald Buddenhagen Hi, Thanks for the quick response, I suspect the interesting bit of the log is: S: [ 3] Callback leave list_store S: [ 3] Leave list_store S: [ 2] Callback leave connect_store S: [ 2] Leave connect_store Connection is now encrypted M: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=GSSAPI AUTH=PLAIN] Dovecot ready. Logging in... Authenticating with SASL mechanism GSSAPI... M: >>> 1 AUTHENTICATE GSSAPI YIIE[around 1700 characters elided] I've bumped size of buf in send_imap_cmd and imap_vprintf to 2048 bytes; no other changes seems to be needed. (I'd rather not provide the complete log as it includes folder names, host names and so on.)
ok, that seems convincing. i bumped it to 4KiB (just to be safe) on the 1.3 branch.
]] Oswald Buddenhagen Much appreciated, thank you! :-)
fixed upstream in v1.4 for good (dynamic buffer). for v1.3, see #1004979.
fixed 908368 isync/1.4.3-1 thanks Oswald Buddenhagen <oswald.buddenhagen@gmx.de> wrote on 17/05/2022 at 16:14:53+0200: Thanks.