isync: Update to 1.4.0 * Import upstream patch to fix runtime errors. Changelog: This is a feature release that comes with significant new functionality: - The IMAP '$Forwarded' / Maildir 'P' (passed) flag is supported now. - Support for configuring a TLS cipher string was added. - IMAP mailbox subscriptions are supported now. - The IMAP user query can be scripted now. - Added built-in support for the macOS Keychain. - Messages excluded by MaxSize will now result in placeholders. Compatibility concerns: - The 'isync' compatibility wrapper was removed. - A C11 compiler is required for building now. - The validity of the config file is checked more stricly now, including: - Appearance of options in unexpected places - The capitalization of INBOX - The new TLSv1.3 flag must be added to SSLVersions if the option is used, unless disabling that version is desired (which is unlikely). - Removed support for the obsolete/insecure SSL v3. - The use of Master/Slave terminology has been deprecated. Bugfixes: - All bugfixes up to 1.3.4 are included. - IMAP protocol errors are handled more robustly now. - Fixed support for SASL's built-in EXTERNAL mechanism. - Improved reliability of synchronization when resuming interrupted runs. - Fixed MaxSize being ignored under certain circumstances when only one of New and ReNew was requested. - Fixed a network inefficiency occurring with server-side mailboxes that receive new messages only via mbsync.diff -r1.50 -r1.51 pkgsrc/mail/isync/Makefile
(ryoon)
@@ -1,17 +1,16 @@ | @@ -1,17 +1,16 @@ | |||
1 | # $NetBSD: Makefile,v 1.50 2020/08/31 18:09:56 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.51 2021/02/17 15:10:11 ryoon Exp $ | |
2 | 2 | |||
3 | DISTNAME= isync-1.3.1 | 3 | DISTNAME= isync-1.4.0 | |
4 | PKGREVISION= 3 | |||
5 | CATEGORIES= mail net | 4 | CATEGORIES= mail net | |
6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=isync/} | 5 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=isync/} | |
7 | 6 | |||
8 | MAINTAINER= tonio@NetBSD.org | 7 | MAINTAINER= tonio@NetBSD.org | |
9 | HOMEPAGE= http://isync.sourceforge.net/ | 8 | HOMEPAGE= http://isync.sourceforge.net/ | |
10 | COMMENT= Synchronize a maildir with an imap server | 9 | COMMENT= Synchronize a maildir with an imap server | |
11 | LICENSE= gnu-gpl-v2 | 10 | LICENSE= gnu-gpl-v2 | |
12 | 11 | |||
13 | USE_LANGUAGES= c99 | 12 | USE_LANGUAGES= c99 | |
14 | USE_TOOLS+= perl | 13 | USE_TOOLS+= perl | |
15 | BDB_ACCEPTED= db4 db5 | 14 | BDB_ACCEPTED= db4 db5 | |
16 | GNU_CONFIGURE= yes | 15 | GNU_CONFIGURE= yes | |
17 | CONFIGURE_ARGS+= --with-ssl=${BUILDLINK_PREFIX.openssl} | 16 | CONFIGURE_ARGS+= --with-ssl=${BUILDLINK_PREFIX.openssl} |
@@ -1,15 +1,12 @@ | @@ -1,15 +1,12 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.6 2018/09/19 13:08:14 schmonz Exp $ | 1 | @comment $NetBSD: PLIST,v 1.7 2021/02/17 15:10:11 ryoon Exp $ | |
2 | bin/isync | |||
3 | bin/mbsync | 2 | bin/mbsync | |
4 | bin/mbsync-get-cert | 3 | bin/mbsync-get-cert | |
5 | bin/mdconvert | 4 | bin/mdconvert | |
6 | man/man1/isync.1 | |||
7 | man/man1/mbsync.1 | 5 | man/man1/mbsync.1 | |
8 | man/man1/mdconvert.1 | 6 | man/man1/mdconvert.1 | |
9 | share/doc/isync/AUTHORS | 7 | share/doc/isync/AUTHORS | |
10 | share/doc/isync/ChangeLog | 8 | share/doc/isync/ChangeLog | |
11 | share/doc/isync/NEWS | 9 | share/doc/isync/NEWS | |
12 | share/doc/isync/README | 10 | share/doc/isync/README | |
13 | share/doc/isync/TODO | 11 | share/doc/isync/TODO | |
14 | share/examples/isync/isyncrc.sample | |||
15 | share/examples/isync/mbsyncrc.sample | 12 | share/examples/isync/mbsyncrc.sample |
@@ -1,10 +1,9 @@ | @@ -1,10 +1,9 @@ | |||
1 | $NetBSD: distinfo,v 1.20 2020/06/12 13:46:22 ryoon Exp $ | 1 | $NetBSD: distinfo,v 1.21 2021/02/17 15:10:11 ryoon Exp $ | |
2 | 2 | |||
3 | SHA1 (isync-1.3.1.tar.gz) = 6806fbe99537c119d2c4e40b9189d4d05f870bda | 3 | SHA1 (isync-1.4.0.tar.gz) = ccd641b0f08de6f68378fac60f01cc13f1fe718c | |
4 | RMD160 (isync-1.3.1.tar.gz) = 65ce1693e2eec5619fc9648e6c568eb4bf9679be | 4 | RMD160 (isync-1.4.0.tar.gz) = 58e71c09c8757bb31b3bdbc5ecd4c9ca0e287e6c | |
5 | SHA512 (isync-1.3.1.tar.gz) = 59d702d41d4a4e72f03cb282b414d0bb859593171763e845bc24d116a74f807a79e5be61f1dd1f59a9ece492322bceac156b08958a246cbfbe7f230fab4cdda2 | 5 | SHA512 (isync-1.4.0.tar.gz) = 6520bcfd9dc5d7c1d51d048c1814104815a3f76a3258ed79c06b22af07d4648340b1c4314175dc448bb109187c3af56565362c58fc744741b1806894e62374f5 | |
6 | Size (isync-1.3.1.tar.gz) = 311868 bytes | 6 | Size (isync-1.4.0.tar.gz) = 334991 bytes | |
7 | SHA1 (patch-ae) = e1a1badcb99fe6089a15a259985933aceedfc110 | 7 | SHA1 (patch-ae) = a3bdbdd05e32474bf76f8110561bdcea9b72b0c3 | |
8 | SHA1 (patch-src_Makefile.in) = b989a7627dbb7c989dd26c3e20beeceb000a7a47 | 8 | SHA1 (patch-src_Makefile.in) = b989a7627dbb7c989dd26c3e20beeceb000a7a47 | |
9 | SHA1 (patch-src_compat_Makefile.in) = ffaba182c6b6b5c50fe82104d508438a3b62ecfd | 9 | SHA1 (patch-src_drv__imap.c) = d27230038c7442c6a0f63ccbb566b67cb1812632 | |
10 | SHA1 (patch-src_drv__imap.c) = bfb7c6a91eb32b98d082bc6c2b183bf5f1a4561d |
@@ -1,15 +1,15 @@ | @@ -1,15 +1,15 @@ | |||
1 | $NetBSD: patch-ae,v 1.6 2014/04/24 14:48:44 schmonz Exp $ | 1 | $NetBSD: patch-ae,v 1.7 2021/02/17 15:10:11 ryoon Exp $ | |
2 | 2 | |||
3 | Avoid segfault when parsing configuration file under NetBSD. | 3 | Avoid segfault when parsing configuration file under NetBSD. | |
4 | 4 | |||
5 | --- src/config.c.orig 2013-12-13 17:54:37.000000000 +0000 | 5 | --- src/config.c.orig 2021-01-01 13:46:36.000000000 +0000 | |
6 | +++ src/config.c | 6 | +++ src/config.c | |
7 | @@ -316,7 +316,7 @@ int | 7 | @@ -320,7 +320,7 @@ int | |
8 | load_config( const char *where, int pseudo ) | 8 | load_config( const char *where ) | |
9 | { | 9 | { | |
10 | conffile_t cfile; | 10 | conffile_t cfile; | |
11 | - store_conf_t *store, **storeapp = &stores; | 11 | - store_conf_t *store, **storeapp = &stores; | |
12 | + store_conf_t *store = NULL, **storeapp = &stores; | 12 | + store_conf_t *store = NULL, **storeapp = &stores; | |
13 | channel_conf_t *channel, **channelapp = &channels; | 13 | channel_conf_t *channel, **channelapp = &channels; | |
14 | group_conf_t *group, **groupapp = &groups; | 14 | group_conf_t *group, **groupapp = &groups; | |
15 | string_list_t *chanlist, **chanlistapp; | 15 | string_list_t *chanlist, **chanlistapp; |
@@ -1,15 +1,103 @@ | @@ -1,15 +1,103 @@ | |||
1 | $NetBSD: patch-src_drv__imap.c,v 1.1 2020/06/12 13:46:22 ryoon Exp $ | 1 | $NetBSD: patch-src_drv__imap.c,v 1.2 2021/02/17 15:10:11 ryoon Exp $ | |
2 | 2 | |||
3 | * Google's Gmail access token is longer than 80 bytes. | 3 | * Fix some runtime errors. | |
4 | From upstream Git: 9e3041de9367113f3b2d7d7543d2eae4c78e2c67 to 95a83c8220861185906df5b38eed589984847bfb | |||
4 | 5 | |||
5 | --- src/drv_imap.c.orig 2019-03-10 10:27:55.000000000 +0000 | 6 | --- src/drv_imap.c | |
6 | +++ src/drv_imap.c | 7 | +++ src/drv_imap.c | |
7 | @@ -1867,7 +1867,7 @@ ensure_password( imap_server_conf_t *srv | 8 | @@ -924,6 +924,7 @@ parse_imap_list( imap_store_t *ctx, char **sp, parse_list_state_t *sts ) | |
8 | if (cmd) { | 9 | } | |
9 | FILE *fp; | 10 | bail: | |
10 | int ret; | 11 | free_list( sts->head ); | |
11 | - char buffer[80]; | 12 | + sts->level = 0; | |
12 | + char buffer[1024]; | 13 | return LIST_BAD; | |
14 | } | |||
13 | 15 | |||
14 | if (*cmd == '+') { | 16 | @@ -1181,7 +1182,8 @@ parse_fetch_rsp( imap_store_t *ctx, list_t *list, char *s ATTR_UNUSED ) | |
15 | flushn(); | 17 | for (cmdp = ctx->in_progress; cmdp; cmdp = cmdp->next) | |
18 | if (cmdp->param.uid == uid) | |||
19 | goto gotuid; | |||
20 | - goto badrsp; | |||
21 | + error( "IMAP error: unexpected FETCH response with BODY (UID %u)\n", uid ); | |||
22 | + return LIST_BAD; | |||
23 | gotuid: | |||
24 | msgdata = ((imap_cmd_fetch_msg_t *)cmdp)->msg_data; | |||
25 | msgdata->data = body->val; | |||
26 | @@ -1208,9 +1210,8 @@ parse_fetch_rsp( imap_store_t *ctx, list_t *list, char *s ATTR_UNUSED ) | |||
27 | memcpy( cur->tuid, tuid, TUIDL ); | |||
28 | status &= ~(M_FLAGS | M_RECENT | M_SIZE | M_HEADER); | |||
29 | } else { | |||
30 | - badrsp: | |||
31 | - error( "IMAP error: unexpected FETCH response (UID %u)\n", uid ); | |||
32 | - return LIST_BAD; | |||
33 | + // These may come in as a result of STORE FLAGS despite .SILENT. | |||
34 | + status &= ~(M_FLAGS | M_RECENT); | |||
35 | } | |||
36 | ||||
37 | if (status) { | |||
38 | @@ -1252,48 +1253,53 @@ parse_response_code( imap_store_t *ctx, imap_cmd_t *cmd, char *s ) | |||
39 | if (!s || *s != '[') | |||
40 | return RESP_OK; /* no response code */ | |||
41 | s++; | |||
42 | - if (!(p = strchr( s, ']' ))) { | |||
43 | - bad_resp: | |||
44 | + if (!(arg = next_arg( &s ))) { | |||
45 | error( "IMAP error: malformed response code\n" ); | |||
46 | return RESP_CANCEL; | |||
47 | } | |||
48 | - *p++ = 0; | |||
49 | - if (!(arg = next_arg( &s ))) | |||
50 | - goto bad_resp; | |||
51 | if (!strcmp( "UIDVALIDITY", arg )) { | |||
52 | if (!(arg = next_arg( &s )) || | |||
53 | - (ctx->uidvalidity = strtoul( arg, &earg, 10 ), *earg)) | |||
54 | + (ctx->uidvalidity = strtoul( arg, &earg, 10 ), *earg != ']')) | |||
55 | { | |||
56 | error( "IMAP error: malformed UIDVALIDITY status\n" ); | |||
57 | return RESP_CANCEL; | |||
58 | } | |||
59 | } else if (!strcmp( "UIDNEXT", arg )) { | |||
60 | if (!(arg = next_arg( &s )) || | |||
61 | - (ctx->uidnext = strtoul( arg, &earg, 10 ), *earg)) | |||
62 | + (ctx->uidnext = strtoul( arg, &earg, 10 ), *earg != ']')) | |||
63 | { | |||
64 | error( "IMAP error: malformed UIDNEXT status\n" ); | |||
65 | return RESP_CANCEL; | |||
66 | } | |||
67 | } else if (!strcmp( "CAPABILITY", arg )) { | |||
68 | + if (!(p = strchr( s, ']' ))) { | |||
69 | + error( "IMAP error: malformed CAPABILITY status\n" ); | |||
70 | + return RESP_CANCEL; | |||
71 | + } | |||
72 | + *p = 0; | |||
73 | parse_capability( ctx, s ); | |||
74 | - } else if (!strcmp( "ALERT", arg )) { | |||
75 | + } else if (!strcmp( "ALERT]", arg )) { | |||
76 | /* RFC2060 says that these messages MUST be displayed | |||
77 | * to the user | |||
78 | */ | |||
79 | - for (; isspace( (uchar)*p ); p++); | |||
80 | - error( "*** IMAP ALERT *** %s\n", p ); | |||
81 | + if (!s) { | |||
82 | + error( "IMAP error: malformed ALERT status\n" ); | |||
83 | + return RESP_CANCEL; | |||
84 | + } | |||
85 | + for (; isspace( (uchar)*s ); s++); | |||
86 | + error( "*** IMAP ALERT *** %s\n", s ); | |||
87 | } else if (cmd && !strcmp( "APPENDUID", arg )) { | |||
88 | if (!(arg = next_arg( &s )) || | |||
89 | (ctx->uidvalidity = strtoul( arg, &earg, 10 ), *earg) || | |||
90 | !(arg = next_arg( &s )) || | |||
91 | - (((imap_cmd_out_uid_t *)cmd)->out_uid = strtoul( arg, &earg, 10 ), *earg)) | |||
92 | + (((imap_cmd_out_uid_t *)cmd)->out_uid = strtoul( arg, &earg, 10 ), *earg != ']')) | |||
93 | { | |||
94 | error( "IMAP error: malformed APPENDUID status\n" ); | |||
95 | return RESP_CANCEL; | |||
96 | } | |||
97 | } else if (!strcmp( "PERMANENTFLAGS", arg )) { | |||
98 | parse_list_init( &ctx->parse_list_sts ); | |||
99 | - if (parse_imap_list( NULL, &s, &ctx->parse_list_sts ) != LIST_OK) { | |||
100 | + if (parse_imap_list( NULL, &s, &ctx->parse_list_sts ) != LIST_OK || *s != ']') { | |||
101 | error( "IMAP error: malformed PERMANENTFLAGS status\n" ); | |||
102 | return RESP_CANCEL; | |||
103 | } |