pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/fdm fdm: Update to 2.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8ac7c2ea9a45
branches:  trunk
changeset: 380256:8ac7c2ea9a45
user:      leot <leot%pkgsrc.org@localhost>
date:      Wed Jun 01 21:07:29 2022 +0000

description:
fdm: Update to 2.1

pkgsrc changes:
 - Remove OAUTHBEARER patches for IMAP, part of 2.1 release

Changes:
2.1
---
 - Add support for LMTP
 - Add support for XOAUTH2 for IMAP
 - Add support for OAUTHBEARER for IMAP
 - Several bug fixes and improvements

diffstat:

 mail/fdm/Makefile                     |   5 +-
 mail/fdm/PLIST                        |   3 +-
 mail/fdm/distinfo                     |  16 +-----
 mail/fdm/patches/patch-MANUAL         |  27 ------------
 mail/fdm/patches/patch-deliver-imap.c |  19 --------
 mail/fdm/patches/patch-deliver.h      |  19 --------
 mail/fdm/patches/patch-fdm.conf.5     |  37 ----------------
 mail/fdm/patches/patch-fetch.h        |  27 ------------
 mail/fdm/patches/patch-imap-common.c  |  74 ---------------------------------
 mail/fdm/patches/patch-lex.c          |  19 --------
 mail/fdm/patches/patch-parse.y        |  78 -----------------------------------
 11 files changed, 8 insertions(+), 316 deletions(-)

diffs (truncated from 382 to 300 lines):

diff -r bc90fa004087 -r 8ac7c2ea9a45 mail/fdm/Makefile
--- a/mail/fdm/Makefile Wed Jun 01 20:56:34 2022 +0000
+++ b/mail/fdm/Makefile Wed Jun 01 21:07:29 2022 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.17 2020/09/03 10:46:38 leot Exp $
+# $NetBSD: Makefile,v 1.18 2022/06/01 21:07:29 leot Exp $
 
-DISTNAME=      fdm-2.0
-PKGREVISION=   5
+DISTNAME=      fdm-2.1
 CATEGORIES=    mail
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=nicm/}
 
diff -r bc90fa004087 -r 8ac7c2ea9a45 mail/fdm/PLIST
--- a/mail/fdm/PLIST    Wed Jun 01 20:56:34 2022 +0000
+++ b/mail/fdm/PLIST    Wed Jun 01 21:07:29 2022 +0000
@@ -1,8 +1,9 @@
-@comment $NetBSD: PLIST,v 1.2 2013/10/03 11:12:43 obache Exp $
+@comment $NetBSD: PLIST,v 1.3 2022/06/01 21:07:29 leot Exp $
 bin/fdm
 man/man1/fdm.1
 man/man5/fdm.conf.5
 share/doc/fdm/MANUAL
+share/examples/fdm/example_imap_folder.conf
 share/examples/fdm/f-terbeck.conf
 share/examples/fdm/g-lando.conf
 share/examples/fdm/n-marriott.conf
diff -r bc90fa004087 -r 8ac7c2ea9a45 mail/fdm/distinfo
--- a/mail/fdm/distinfo Wed Jun 01 20:56:34 2022 +0000
+++ b/mail/fdm/distinfo Wed Jun 01 21:07:29 2022 +0000
@@ -1,15 +1,7 @@
-$NetBSD: distinfo,v 1.17 2021/10/26 10:54:00 nia Exp $
+$NetBSD: distinfo,v 1.18 2022/06/01 21:07:29 leot Exp $
 
-BLAKE2s (fdm-2.0.tar.gz) = 7d5c256a0fc7be323419acf3e195d961f65d7e82c1d7a9747e3358ac3a98e169
-SHA512 (fdm-2.0.tar.gz) = 9c321dfd200af7b7d396524a43a3ac4b569cddda0a2096122b935e9d7bdb8101f269341fae5bbd4ad8a2947312774da2d49e03eddc67c6ecbce4e1ff9488ebe2
-Size (fdm-2.0.tar.gz) = 180662 bytes
-SHA1 (patch-MANUAL) = e7cc443a970b350be9ced14f73bb873023ab91e3
+BLAKE2s (fdm-2.1.tar.gz) = 5744cd86e54562bd057e368faf1ec64906eed7dce3d06ec0ee49668c7bc6b787
+SHA512 (fdm-2.1.tar.gz) = 1963c9149039adebf53e8734083c5c17db3522740b857da9e60779890f2e7aca4b0d0eae922ef041201d1bd95e26adb197e56aa142a5d2bd33e58266fd81daea
+Size (fdm-2.1.tar.gz) = 184711 bytes
 SHA1 (patch-Makefile.am) = 2169ebc8e7c920cdf8492ee2039b410f5a6e358c
-SHA1 (patch-deliver-imap.c) = 3be95a6ef4ba8946a72e8bb4c0c4c32384044e3f
-SHA1 (patch-deliver.h) = 618d73f8fa2d69112ae85d858261d7f77a4e5c98
-SHA1 (patch-fdm.conf.5) = 4d43169edec6958ff591487be34f041054bfb476
-SHA1 (patch-fetch.h) = 225c3d83282057781cacd7ba84af1d16bd4b7616
-SHA1 (patch-imap-common.c) = 264f43c3703fa282f4431d7ba4b9fced08df1968
-SHA1 (patch-lex.c) = 457abcef58add76cd4b76351a1961c45abc2f783
-SHA1 (patch-parse.y) = 56e27e155b6d99e3539d4dfe7f90d5c607fb4153
 SHA1 (patch-shm-mmap.c) = 3cd0c54c982ddd4702ad921ebf5f1b890b503cd4
diff -r bc90fa004087 -r 8ac7c2ea9a45 mail/fdm/patches/patch-MANUAL
--- a/mail/fdm/patches/patch-MANUAL     Wed Jun 01 20:56:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-$NetBSD: patch-MANUAL,v 1.1 2020/08/29 13:43:54 leot Exp $
-
-Add support for OAUTHBEARER (OAuth 2.0 bearer tokens, as documented by
-RFC 7628) for IMAP.
-
-Patch shared upstream via:
-
- <https://github.com/nicm/fdm/pull/84>
-
---- MANUAL.orig        2019-02-12 22:08:26.000000000 +0000
-+++ MANUAL
-@@ -680,9 +680,12 @@ Examples of IMAP and IMAPS accounts incl
- 
- By default, fdm prefers the CRAM-MD5 authentication method, since no passwords
- are sent in the clear.  If the server does not advertise CRAM-MD5 capability,
--the older LOGIN method is used.  For IMAPS connections (which use SSL), the
--LOGIN method is just as secure.  Either of these methods may be disabled with
--the 'no-cram-md5' and 'no-login' options.
-+and 'oauthbearer' option is not passed the older LOGIN method is used.  For
-+IMAPS connections (which use SSL), the LOGIN method is just as secure.  
-+Either of these methods may be disabled with the 'no-cram-md5' and 'no-login'
-+options.  If the server advertises OAUTHBEARER capability, 'oauthbearer'
-+option will use OAuth 2.0 bearer tokens - passed via 'pass' keyword - as
-+authentication method.
- 
- The 'starttls' keyword may be added to an IMAP account to attemp STARTTLS after
- connection.
diff -r bc90fa004087 -r 8ac7c2ea9a45 mail/fdm/patches/patch-deliver-imap.c
--- a/mail/fdm/patches/patch-deliver-imap.c     Wed Jun 01 20:56:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-$NetBSD: patch-deliver-imap.c,v 1.1 2020/08/29 13:43:54 leot Exp $
-
-Add support for OAUTHBEARER (OAuth 2.0 bearer tokens, as documented by
-RFC 7628) for IMAP.
-
-Patch shared upstream via:
-
- <https://github.com/nicm/fdm/pull/84>
-
---- deliver-imap.c.orig        2019-02-12 22:08:26.000000000 +0000
-+++ deliver-imap.c
-@@ -197,6 +197,7 @@ deliver_imap_deliver(struct deliver_ctx 
-       fdata.pass = data->pass;
-       fdata.nocrammd5 = data->nocrammd5;
-       fdata.nologin = data->nologin;
-+      fdata.oauthbearer = data->oauthbearer;
-       memcpy(&fdata.server, &data->server, sizeof fdata.server);
-       fdata.io = io;
-       fdata.only = FETCH_ONLY_ALL;
diff -r bc90fa004087 -r 8ac7c2ea9a45 mail/fdm/patches/patch-deliver.h
--- a/mail/fdm/patches/patch-deliver.h  Wed Jun 01 20:56:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-$NetBSD: patch-deliver.h,v 1.1 2020/08/29 13:43:54 leot Exp $
-
-Add support for OAUTHBEARER (OAuth 2.0 bearer tokens, as documented by
-RFC 7628) for IMAP.
-
-Patch shared upstream via:
-
- <https://github.com/nicm/fdm/pull/84>
-
---- deliver.h.orig     2019-02-12 22:08:26.000000000 +0000
-+++ deliver.h
-@@ -82,6 +82,7 @@ struct deliver_imap_data {
-       struct server    server;
-       int              nocrammd5;
-       int              nologin;
-+      int              oauthbearer;
-       int              starttls;
- 
-       struct replstr   folder;
diff -r bc90fa004087 -r 8ac7c2ea9a45 mail/fdm/patches/patch-fdm.conf.5
--- a/mail/fdm/patches/patch-fdm.conf.5 Wed Jun 01 20:56:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-$NetBSD: patch-fdm.conf.5,v 1.1 2020/08/29 13:43:54 leot Exp $
-
-Add support for OAUTHBEARER (OAuth 2.0 bearer tokens, as documented by
-RFC 7628) for IMAP.
-
-Patch shared upstream via:
-
- <https://github.com/nicm/fdm/pull/84>
-
---- fdm.conf.5.orig    2019-02-12 22:08:26.000000000 +0000
-+++ fdm.conf.5
-@@ -473,6 +473,7 @@ not be read from
- .Op Ic no-login
- .Op Ic starttls
- .Op Ic insecure
-+.Op Ic oauthbearer
- .Xc
- .It Xo Ic imap Ic server Ar host
- .Op Ic port Ar port
-@@ -492,6 +493,7 @@ not be read from
- .Op Ic no-cram-md5
- .Op Ic no-login
- .Op Ic insecure
-+.Op Ic oauthbearer
- .Xc
- These define an IMAP or IMAPS account.
- The parameters are as for a POP3 or POP3S account, aside from the additional
-@@ -530,6 +532,9 @@ after connection.
- .Ic insecure
- allows the use of insecure protocols, which currently includes SSLv2, SSLv3
- and TLS1.0.
-+.Pp
-+.Ic oauthbearer
-+attempts to use OAuth 2.0 bearer token as authentication method.
- .It Xo Ic imap Ic pipe Ar command
- .Op Ar userpass
- .Op Ar folders
diff -r bc90fa004087 -r 8ac7c2ea9a45 mail/fdm/patches/patch-fetch.h
--- a/mail/fdm/patches/patch-fetch.h    Wed Jun 01 20:56:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-$NetBSD: patch-fetch.h,v 1.1 2020/08/29 13:43:54 leot Exp $
-
-Add support for OAUTHBEARER (OAuth 2.0 bearer tokens, as documented by
-RFC 7628) for IMAP.
-
-Patch shared upstream via:
-
- <https://github.com/nicm/fdm/pull/84>
-
---- fetch.h.orig       2019-02-12 22:08:26.000000000 +0000
-+++ fetch.h
-@@ -204,6 +204,7 @@ struct fetch_imap_data {
-       int              starttls;
-       int              nocrammd5;
-       int              nologin;
-+      int              oauthbearer;
- 
-       u_int            folder;
-       struct strings  *folders;
-@@ -252,6 +253,7 @@ struct fetch_imap_mail {
- #define IMAP_CAPA_STARTTLS 0x4
- #define IMAP_CAPA_NOSPACE 0x8
- #define IMAP_CAPA_GMEXT 0x10
-+#define IMAP_CAPA_AUTH_OAUTHBEARER 0x20
- 
- /* fetch-maildir.c */
- extern struct fetch    fetch_maildir;
diff -r bc90fa004087 -r 8ac7c2ea9a45 mail/fdm/patches/patch-imap-common.c
--- a/mail/fdm/patches/patch-imap-common.c      Wed Jun 01 20:56:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-$NetBSD: patch-imap-common.c,v 1.2 2020/09/03 10:46:39 leot Exp $
-
-Add support for OAUTHBEARER (OAuth 2.0 bearer tokens, as documented by
-RFC 7628) for IMAP.
-
-Patch shared upstream via:
-
- <https://github.com/nicm/fdm/pull/84>
-
---- imap-common.c.orig 2019-02-12 22:08:26.000000000 +0000
-+++ imap-common.c
-@@ -45,6 +45,7 @@ int  imap_state_connect(struct account *,
- int   imap_state_capability1(struct account *, struct fetch_ctx *);
- int   imap_state_capability2(struct account *, struct fetch_ctx *);
- int   imap_state_starttls(struct account *, struct fetch_ctx *);
-+int   imap_state_oauthbearer_auth(struct account *, struct fetch_ctx *);
- int   imap_state_cram_md5_auth(struct account *, struct fetch_ctx *);
- int   imap_state_login(struct account *, struct fetch_ctx *);
- int   imap_state_user(struct account *, struct fetch_ctx *);
-@@ -295,6 +296,12 @@ imap_pick_auth(struct account *a, struct
- {
-       struct fetch_imap_data  *data = a->data;
- 
-+      /* Try OAUTHBEARER, if requested by user and if server supports it. */
-+      if (data->oauthbearer && (data->capa & IMAP_CAPA_AUTH_OAUTHBEARER)) {
-+              fctx->state = imap_state_oauthbearer_auth;
-+              return (FETCH_AGAIN);
-+      }
-+
-       /* Try CRAM-MD5, if server supports it and user allows it. */
-       if (!data->nocrammd5 && (data->capa & IMAP_CAPA_AUTH_CRAM_MD5)) {
-               if (imap_putln(a,
-@@ -401,6 +408,9 @@ imap_state_capability1(struct account *a
-       if (strstr(line, "AUTH=CRAM-MD5") != NULL)
-               data->capa |= IMAP_CAPA_AUTH_CRAM_MD5;
- 
-+      if (strstr(line, "AUTH=OAUTHBEARER") != NULL)
-+              data->capa |= IMAP_CAPA_AUTH_OAUTHBEARER;
-+
-       /* Use XYZZY to detect Google brokenness. */
-       if (strstr(line, "XYZZY") != NULL)
-               data->capa |= IMAP_CAPA_XYZZY;
-@@ -470,6 +480,31 @@ imap_state_starttls(struct account *a, s
-       return (imap_pick_auth(a, fctx));
- }
- 
-+/* OAUTHBEARER auth state. */
-+int
-+imap_state_oauthbearer_auth(struct account *a, struct fetch_ctx *fctx)
-+{
-+      struct fetch_imap_data  *data = a->data;
-+      char                    *src, *b64;
-+
-+      xasprintf(&src,
-+          "n,a=%s,\001host=%s\001port=%s\001auth=Bearer %s\001\001",
-+          data->user, data->server.host, data->server.port, data->pass);
-+      b64 = imap_base64_encode(src);
-+      xfree(src);
-+
-+      if (imap_putln(a,
-+          "%u AUTHENTICATE OAUTHBEARER %s", ++data->tag, b64) != 0) {
-+              xfree(b64);
-+              return (FETCH_ERROR);
-+      }
-+      xfree(b64);
-+
-+      fctx->state = imap_state_pass;
-+      return (FETCH_BLOCK);
-+}
-+
-+
- /* CRAM-MD5 auth state. */
- int
- imap_state_cram_md5_auth(struct account *a, struct fetch_ctx *fctx)
diff -r bc90fa004087 -r 8ac7c2ea9a45 mail/fdm/patches/patch-lex.c
--- a/mail/fdm/patches/patch-lex.c      Wed Jun 01 20:56:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-$NetBSD: patch-lex.c,v 1.1 2020/08/29 13:43:54 leot Exp $
-
-Add support for OAUTHBEARER (OAuth 2.0 bearer tokens, as documented by
-RFC 7628) for IMAP.
-
-Patch shared upstream via:
-
- <https://github.com/nicm/fdm/pull/84>
-
---- lex.c.orig 2019-02-12 22:08:26.000000000 +0000
-+++ lex.c
-@@ -157,6 +157,7 @@ static const struct token tokens[] = {
-       { "no-verify", TOKNOVERIFY },
-       { "none", TOKNONE },
-       { "not", TOKNOT },
-+      { "oauthbearer", TOKOAUTHBEARER },
-       { "old-only", TOKOLDONLY },
-       { "or", TOKOR },
-       { "parallel-accounts", TOKPARALLELACCOUNTS },



Home | Main Index | Thread Index | Old Index