Created attachment 245754 [details] patch Some imap servers (gmail) apparently doesn't send a close notification (SSL_shutdown()) before closing the TCP socket. mbsync exits with the following error with OpenSSL 3.0: Socket error: secure read from imap.gmail.com ([2a00:1450:400c:c02::6d]:993): error:0A000126:SSL routines::unexpected eof while reading Add patch available upstream [1] but yet unreleased. [1] https://sourceforge.net/p/isync/isync/ci/b6c36624f04cd388873785c0631df3f2f9ac4bf0/ Tested on FreeBSD 12.4-RELEASE, built with poudriere. Build log available here (for 15 days) https://pkg.ploup.net/data/FreeBSD:12:amd64-default/2023-10-20_08h11m00s/logs/isync-1.4.4_1.log
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a4ef2ba2e61e3a4190f04c889ded4f6688163354 commit a4ef2ba2e61e3a4190f04c889ded4f6688163354 Author: François Charlier <fcharlier@ploup.net> AuthorDate: 2023-10-20 16:15:41 +0000 Commit: Emanuel Haupt <ehaupt@FreeBSD.org> CommitDate: 2023-10-20 16:15:41 +0000 mail/isync: Resolve "unexpected EOF" SSL error Fixes an issue where some IMAP servers, such as Gmail, do not send a close notification (SSL_shutdown()) before closing the TCP socket, leading to "unexpected EOF" errors with OpenSSL 3.0. Now mbsync gracefully handles this scenario, preventing the following error: Socket error: secure read from imap.gmail.com ([IPv6 Address Redacted]:993): error:0A000126:SSL routines::unexpected eof while reading PR: 274604 mail/isync/Makefile | 1 + mail/isync/files/patch-src_drv__imap.c (new) | 25 +++++++++++++++++++++++++ mail/isync/files/patch-src_socket.c (new) | 18 ++++++++++++++++++ mail/isync/files/patch-src_socket.h (new) | 10 ++++++++++ 4 files changed, 54 insertions(+)
A commit in branch 2023Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b6aa231a7a473ac3cf35a59a3beaf90023e041b2 commit b6aa231a7a473ac3cf35a59a3beaf90023e041b2 Author: François Charlier <fcharlier@ploup.net> AuthorDate: 2023-10-20 16:15:41 +0000 Commit: Emanuel Haupt <ehaupt@FreeBSD.org> CommitDate: 2023-10-20 16:22:59 +0000 mail/isync: Resolve "unexpected EOF" SSL error Fixes an issue where some IMAP servers, such as Gmail, do not send a close notification (SSL_shutdown()) before closing the TCP socket, leading to "unexpected EOF" errors with OpenSSL 3.0. Now mbsync gracefully handles this scenario, preventing the following error: Socket error: secure read from imap.gmail.com ([IPv6 Address Redacted]:993): error:0A000126:SSL routines::unexpected eof while reading PR: 274604 (cherry picked from commit a4ef2ba2e61e3a4190f04c889ded4f6688163354) mail/isync/Makefile | 1 + mail/isync/files/patch-src_drv__imap.c (new) | 25 +++++++++++++++++++++++++ mail/isync/files/patch-src_socket.c (new) | 18 ++++++++++++++++++ mail/isync/files/patch-src_socket.h (new) | 10 ++++++++++ 4 files changed, 54 insertions(+)
Committed, thanks!