head 1.9; access; symbols pkgsrc-2026Q1:1.8.0.24 pkgsrc-2026Q1-base:1.8 pkgsrc-2025Q4:1.8.0.22 pkgsrc-2025Q4-base:1.8 pkgsrc-2025Q3:1.8.0.20 pkgsrc-2025Q3-base:1.8 pkgsrc-2025Q2:1.8.0.18 pkgsrc-2025Q2-base:1.8 pkgsrc-2025Q1:1.8.0.16 pkgsrc-2025Q1-base:1.8 pkgsrc-2024Q4:1.8.0.14 pkgsrc-2024Q4-base:1.8 pkgsrc-2024Q3:1.8.0.12 pkgsrc-2024Q3-base:1.8 pkgsrc-2024Q2:1.8.0.10 pkgsrc-2024Q2-base:1.8 pkgsrc-2024Q1:1.8.0.8 pkgsrc-2024Q1-base:1.8 pkgsrc-2023Q4:1.8.0.6 pkgsrc-2023Q4-base:1.8 pkgsrc-2023Q3:1.8.0.4 pkgsrc-2023Q3-base:1.8 pkgsrc-2023Q2:1.8.0.2 pkgsrc-2023Q2-base:1.8 pkgsrc-2019Q4:1.6.0.10 pkgsrc-2019Q4-base:1.6 pkgsrc-2019Q3:1.6.0.6 pkgsrc-2019Q3-base:1.6 pkgsrc-2019Q2:1.6.0.4 pkgsrc-2019Q2-base:1.6 pkgsrc-2019Q1:1.6.0.2 pkgsrc-2019Q1-base:1.6 pkgsrc-2018Q4:1.5.0.4 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.2 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.4.0.16 pkgsrc-2018Q2-base:1.4 pkgsrc-2018Q1:1.4.0.14 pkgsrc-2018Q1-base:1.4 pkgsrc-2017Q4:1.4.0.12 pkgsrc-2017Q4-base:1.4 pkgsrc-2017Q3:1.4.0.10 pkgsrc-2017Q3-base:1.4 pkgsrc-2017Q2:1.4.0.6 pkgsrc-2017Q2-base:1.4 pkgsrc-2017Q1:1.4.0.4 pkgsrc-2017Q1-base:1.4 pkgsrc-2016Q4:1.4.0.2 pkgsrc-2016Q4-base:1.4 pkgsrc-2016Q3:1.3.0.12 pkgsrc-2016Q3-base:1.3 pkgsrc-2016Q2:1.3.0.10 pkgsrc-2016Q2-base:1.3 pkgsrc-2016Q1:1.3.0.8 pkgsrc-2016Q1-base:1.3 pkgsrc-2015Q4:1.3.0.6 pkgsrc-2015Q4-base:1.3 pkgsrc-2015Q3:1.3.0.4 pkgsrc-2015Q3-base:1.3 pkgsrc-2015Q2:1.3.0.2; locks; strict; comment @ * @; 1.9 date 2026.05.14.13.15.14; author ktnb; state dead; branches; next 1.8; commitid Fk7wJzyS5N6ZEMFG; 1.8 date 2023.05.13.08.49.27; author ryoon; state Exp; branches; next 1.7; commitid 15H5HZz2ilOYrMoE; 1.7 date 2019.12.29.01.00.22; author ryoon; state dead; branches; next 1.6; commitid Bc3jA85t1ZTjqxQB; 1.6 date 2019.03.08.18.14.45; author ryoon; state Exp; branches; next 1.5; commitid ZwkqQgU2wVJ4FAeB; 1.5 date 2018.09.19.13.08.14; author schmonz; state Exp; branches; next 1.4; commitid xt6PA98ofK6KqISA; 1.4 date 2016.12.15.14.15.01; author schmonz; state Exp; branches; next 1.3; commitid SA2ND45RLIm5t5yz; 1.3 date 2015.07.04.15.52.51; author bsiegert; state Exp; branches 1.3.2.1; next 1.2; commitid ecjnfXg9FaLI2Zry; 1.2 date 2014.06.09.17.29.09; author schmonz; state dead; branches; next 1.1; commitid UEhnxTT4Q47a7SDx; 1.1 date 2014.05.17.04.06.56; author schmonz; state Exp; branches; next ; commitid 0nrpVi9tVmyGpQAx; 1.3.2.1 date 2015.07.04.15.52.51; author tron; state dead; branches; next 1.3.2.2; commitid xBESH9XRtSOOewsy; 1.3.2.2 date 2015.07.08.19.51.35; author tron; state Exp; branches; next ; commitid xBESH9XRtSOOewsy; desc @@ 1.9 log @isync: update to 1.5.1 1.5.1 (2025-03-11) ================== Improvements: - mbsync-get-cert now supports STARTTLS; new option -s - Zero-sized messages from IMAP Stores are now accepted - UIDVALIDITY change recovery is now attempted even if both sides of the Channel are affected - The sync summary at the end is more concise again - Cosmetic improvements to some console output Bug Fixes: - Fixed IMAP INBOX not being properly recognized with some servers - Fixed Maildir INBOX nested into Path not being implicitly listed - Fixed crash when resuming message propagation with MaxMessages - Fixed --list-stores hanging after synchronous error - Fixed --dry-run without --debug-driver not being really dry - Fixed building from pristine git clones - Fixed building from shallow git clones 1.5.0 (2024-08-02) ================== Compatibility Concerns: - The reference point for relative local paths in the configuration file is now the file's containing directory - Maildir Path cannot be nested into Inbox anymore (this was never documented) - Renamed the ReNew/--renew/-N options to Upgrade/--upgrade/-u and Delete/--delete/-d to Gone/--gone/-g - Superseded SSLVersions option with TLSVersions, and disabled TLS v1.0 and v1.1 by default - Renamed SSLType option to TLSType - Placeholders will be now created for messages exceeding MaxSize even if they are flagged on the source side - Placeholder upgrades no longer pull flag updates along unless also requested - New messages which we are about to expunge from the source side are not propaged any more even if the target side would keep them - Tunnel is now consistently assumed to be secure, so some warnings are gone New Features: - Changed default config & state locations to follow the XDG basedir spec; the old locations remain supported - Added support for IMAP mailbox names with non-ASCII characters - Added support for Maildir Paths with suffixes (not ending with a slash) - Made the Channel side to expire with MaxMessages configurable - MaxMessages and MaxSize can be used together now - The unfiltered list of mailboxes in each Store can be printed now - A proper summary is now printed prior to exiting. This includes expunges, which are now included in the progress as well. - Added support for mirroring deletions more accurately; option ExpungeSolo - Added new sync operation 'Old' to retry previously skipped messages - Added --ext-exit option to indicate with the exit code whether Stores were modified - Added --dry-run option Improvements: - Added support for the LITERAL- IMAP extension, which improves upload performance with f.ex. GMail somewhat - Improved error handling when attempting to store too big messages on f.ex. GMail - Malformed messages with incomplete headers will be propagated now - A notice is now emitted if the server does not support race-free Trash - Improved checking for invalid command lines - Options not supported due to the build configuration are still recognized now, to make error messages more helpful - The progress indicator is rate-limited now - Various improvements to the debugging output - Vastly extended the autotest suite Bug Fixes: - Worked around "unexpected EOF" error messages at end of TLS connections; affects f.ex. GMail - Worked around protocol corruption issue with iCloud (mail.me.com) - Fixed missing CAPABILITY command after logging in if the server does not report updated capabilities automatically (affects f.ex. MS Exchange) - Fixed CopyArrivalDate failing on some date strings - Fixed propagation of new messages to non-UIDPLUS servers - Fixed Timeout being ignored by DNS host resolution - Fixed broken Tunnel potentially causing SIGPIPE - Fixed Tunnel leaving behind zombie processes - Fixed expunges not being propagated at all if the first run after they occurred did not include --delete - Fixed MaxMessages being exceeded when only --new was used - Fixed messages being instantly expired despite being important when only --new was used - Trash-ing failures now prevent expunging and cause a non-zero exit code - Fixed placeholders being needlessly trashed - Fixed TrashNewOnly and TrashRemoteNew omitting messages for which only a placeholder was synced - Fixed TrashRemoteNew omitting messages which exceed MaxSize - Fixed TrashRemoteNew not using race-free expunge - Optimized some places with unnecessarily high CPU usage - Fixed unnecessary network usage by non-selective uni-directional syncs when no placeholders are present - Fixed crash when Patterns yields nothing when built with new compilers - Fixed crash when all flag propagations to a mailbox failed - Fixed handling of errors during opening mailboxes - Removed useless "lost track of ... messages" warnings when resuming after an interruption - Fixed many minor bugs in corner cases, mostly when resuming after interruptions 1.4.4 (2021-12-03) ================== Bug Fixes: - Fixed CVE-2021-3657: multiple buffer overflows on excessively large IMAP literals - Fixed CVE-2021-44143: buffer overflow on header-less messages - Fixed crash on certain malformed messages in Maildirs - Fixed somewhat spurious notice about conflicting changes on messages marked as deleted @ text @$NetBSD: patch-src_socket.c,v 1.8 2023/05/13 08:49:27 ryoon Exp $ Fix non-critical runtime error with OpenSSL 3. From: Upstream b6c36624f04cd388873785c0631df3f2f9ac4bf0 --- src/socket.c.orig 2021-12-03 10:56:16.000000000 +0000 +++ src/socket.c @@@@ -810,6 +810,15 @@@@ socket_expect_activity( conn_t *conn, in conf_wakeup( &conn->fd_timeout, expect ? conn->conf->timeout : -1 ); } +void +socket_expect_eof( conn_t *sock ) +{ +#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF // implies HAVE_LIBSSL + if (sock->ssl) + SSL_set_options( sock->ssl, SSL_OP_IGNORE_UNEXPECTED_EOF ); +#endif +} + int socket_read( conn_t *conn, char *buf, uint len ) { @ 1.8 log @isync: Fix runtime error with OpenSSL 3. @ text @d1 1 a1 1 $NetBSD$ @ 1.7 log @Update to 1.3.1 * Enable SASL support Changelog: This is a long overdue maintenance release: - SSL now uses SNI, which for example GMail requires - fixed fallbacks for missing UIDPLUS extension (with e.g. DavMail) - fixed UIDVALIDITY recovery with really long Message-id headers - fixed GSSAPI authentication with Kerberos - fixed support for IMAP servers which do not sort search results (e.g., poczta.o2.pl) - fixed CopyArrivalDate on platforms without glibc - fixed useless SASL warnings with certain plugins - the perl 5.14 requirement is now made explicit - improved OpenBSD support - fixed a bunch of compiler warnings @ text @d1 1 a1 1 $NetBSD: patch-src_socket.c,v 1.6 2019/03/08 18:14:45 ryoon Exp $ d3 2 a4 1 Support SNI, from https://sourceforge.net/p/isync/isync/ci/17babc1695e82ca80d032b79e920fcb86ede2347/tree/src/socket.c?diff=f698f16967ae8341ff4b506f96b8cd5790c05d27 d6 1 a6 3 Prevent mbsync from crashing, PR pkg/49784. --- src/socket.c.orig 2017-10-01 08:42:35.000000000 +0000 d8 3 a10 1 @@@@ -270,6 +270,8 @@@@ socket_start_tls( conn_t *conn, void (*c d12 11 a22 9 init_wakeup( &conn->ssl_fake, ssl_fake_cb, conn ); conn->ssl = SSL_new( ((server_conf_t *)conn->conf)->SSLContext ); + if (ssl_return( "set server name", conn, SSL_set_tlsext_host_name( conn->ssl, conn->conf->host ) ) < 0) + return; SSL_set_fd( conn->ssl, conn->fd ); SSL_set_mode( conn->ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER ); socket_expect_read( conn, 1 ); @@@@ -542,8 +544,10 @@@@ static void socket_connected( conn_t *conn ) a23 10 #ifdef HAVE_IPV6 - freeaddrinfo( conn->addrs ); - conn->addrs = 0; + if (conn->addrs) { + freeaddrinfo( conn->addrs ); + conn->addrs = 0; + } #endif conf_notifier( &conn->notify, 0, POLLIN ); socket_expect_read( conn, 0 ); @ 1.6 log @Support SNI with upstream patch * Support SNI. for example Google GMail IMAP4 server * Bump PKGREVISION @ text @d1 1 a1 1 $NetBSD: patch-src_socket.c,v 1.5 2018/09/19 13:08:14 schmonz Exp $ @ 1.5 log @Update to 1.3.0. From the changelog: - Network timeout handling has been added. - Support for proper Maildir++ and a Maildir sub-folder naming style without extra dots have been added. - Support for TLS client certificates was added. - Support for recovering from baseless UID validity changes was added. - The get-cert script was renamed to mbsync-get-cert. @ text @d1 3 a3 1 $NetBSD: patch-src_socket.c,v 1.4 2016/12/15 14:15:01 schmonz Exp $ d9 10 a18 1 @@@@ -542,8 +542,10 @@@@ static void @ 1.4 log @Update to 1.2.1. From the changelog: - The 'isync' compatibility wrapper is now deprecated. - An IMAP Path/NAMESPACE rooted in INBOX won't be handled specially any more. This means that some Patterns may need adjustment. - The default output is a lot less verbose now. The meanings of the -V and -D options changed significantly. - The SSL/TLS configuration has been re-designed. SSL is now explicitly enabled or disabled - "use SSL if available" is gone. Notice: Tunnels are assumed to be secure and thus default to no SSL. - Support for SASL (flexible authentication) has been added. - Support for Windows file systems has been added. - Support for compressed data transfer has been added. - Folder deletions can be propagated now. @ text @d1 1 a1 1 $NetBSD: patch-src_socket.c,v 1.3 2015/07/04 15:52:51 bsiegert Exp $ d5 1 a5 1 --- src/socket.c.orig 2015-09-27 10:13:04.000000000 +0000 d7 1 a7 1 @@@@ -509,7 +509,10 @@@@ static void d12 2 a13 1 + if ( conn->addrs ) { d15 1 a15 1 + conn->addrs = NULL; d19 1 a19 1 conn->state = SCK_READY; @ 1.3 log @Fix crashing bug in mbsync on NetBSD 6. From Enami Tsugutumo in PR pkg/49784. @ text @d1 2 a2 1 $NetBSD$ d5 1 a5 1 --- src/socket.c.orig 2015-07-04 15:47:16.000000000 +0000 d7 1 a7 1 @@@@ -477,7 +477,10 @@@@ static void d17 1 a17 1 conf_fd( conn->fd, 0, POLLIN ); a18 12 @@@@ -488,7 +491,10 @@@@ static void socket_connect_bail( conn_t *conn ) { #ifdef HAVE_IPV6 - freeaddrinfo( conn->addrs ); + if ( conn->addrs ) { + freeaddrinfo( conn->addrs ); + conn->addrs = NULL; + } #endif free( conn->name ); conn->name = 0; @ 1.3.2.1 log @file patch-src_socket.c was added on branch pkgsrc-2015Q2 on 2015-07-08 19:51:35 +0000 @ text @d1 29 @ 1.3.2.2 log @Pullup ticket #4760 - requested by bsiegert mail/isync: bug fix patch Revisions pulled up: - mail/isync/Makefile 1.37 - mail/isync/distinfo 1.14 - mail/isync/patches/patch-src_socket.c 1.3 --- Module Name: pkgsrc Committed By: bsiegert Date: Sat Jul 4 15:52:51 UTC 2015 Modified Files: pkgsrc/mail/isync: Makefile distinfo Added Files: pkgsrc/mail/isync/patches: patch-src_socket.c Log Message: Fix crashing bug in mbsync on NetBSD 6. From Enami Tsugutumo in PR pkg/49784. @ text @a0 29 $NetBSD$ Prevent mbsync from crashing, PR pkg/49784. --- src/socket.c.orig 2015-07-04 15:47:16.000000000 +0000 +++ src/socket.c @@@@ -477,7 +477,10 @@@@ static void socket_connected( conn_t *conn ) { #ifdef HAVE_IPV6 - freeaddrinfo( conn->addrs ); + if ( conn->addrs ) { + freeaddrinfo( conn->addrs ); + conn->addrs = NULL; + } #endif conf_fd( conn->fd, 0, POLLIN ); conn->state = SCK_READY; @@@@ -488,7 +491,10 @@@@ static void socket_connect_bail( conn_t *conn ) { #ifdef HAVE_IPV6 - freeaddrinfo( conn->addrs ); + if ( conn->addrs ) { + freeaddrinfo( conn->addrs ); + conn->addrs = NULL; + } #endif free( conn->name ); conn->name = 0; @ 1.2 log @Update to 1.1.1. From the changelog: * src/mbsync.1: * don't lie about the default of User * fix typos * src/drv_maildir.c: * don't forget to reset message counts when skipping scan * remove apparently pointless resetting of recent message count * src/compat/convert.c: * error-check renaming of uid mapping database * error-check reading of old uidvalidity and maxuid files * src/sync.c: * error-check committing of sync state * better error messages for sync state and journal related errors * remove pointless/counterproductive "Disk full?" error message suffixes * don't crash in message expiration debug print * src/compat/config.c: * fix "inverse copy&pasto" in account labeling code * don't needlessly quote strings * write Sync and Expunge to global section if applicable * don't bother checking impossible condition * src/main.c: * fix segfault on passing --{create,expunge}-{master,slave} * don't needlessly spell out INBOX * src/drv_imap.c: * don't crash on malformed response code * don't crash on truncated LIST response * fix crash on store without prior fetch with non-UIDPLUS servers * don't error out if we don't get an X-TUID header * src/compat/main.c: * remove pointless pointer assignment * src/: drv_maildir.c, mdconvert.c: * fix hypothetical buffer overflows * close a bunch of fd leaks in error paths * src/util.c: * actually use prime numbers for all hash bucket sizes * src/config.c: * fix zero MaxSize override in Channels * src/compat/: config.c, isync.h, util.c: * rework maildir store mapping * src/socket.c: * remove pointless use of AI_V4MAPPED flag * configure.ac, src/common.h, src/drv_imap.c, src/util.c: * make date parsing portable, take 2 * src/: drv_maildir.c, sync.c: * fix _POSIX_SYNCHRONIZED_IO usage Many of these changes were in response to findings from a Coverity scan. @ text @d1 2 a2 1 $NetBSD: patch-src_socket.c,v 1.1 2014/05/17 04:06:56 schmonz Exp $ d4 1 a4 3 NetBSD does not support AI_V4MAPPED. --- src/socket.c.orig 2013-12-13 17:54:37.000000000 +0000 d6 24 a29 12 @@@@ -349,7 +349,11 @@@@ socket_connect( conn_t *sock, void (*cb) memset( &hints, 0, sizeof(hints) ); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; +#if defined(HAVE_DECL_AI_V4MAPPED) hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG; +#else + hints.ai_flags = AI_ADDRCONFIG; +#endif infon( "Resolving %s... ", conf->host ); if ((gaierr = getaddrinfo( conf->host, NULL, &hints, &sock->addrs ))) { error( "IMAP error: Cannot resolve server '%s': %s\n", conf->host, gai_strerror( gaierr ) ); @ 1.1 log @Detect absence of AI_V4MAPPED to fix build on NetBSD. @ text @d1 1 a1 1 $NetBSD$ @