pkgsrc-WIP-changes archive

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

Add a patch so mlmmj works inside RFC limits for sender address.



Module Name:	pkgsrc-wip
Committed By:	Roy Marples <roy%marples.name@localhost>
Pushed By:	roy
Date:		Sun Jan 7 18:45:22 2018 +0000
Changeset:	ddd66ab9209a1069963021e00659c5b4ec621db7

Modified Files:
	mlmmj/Makefile
	mlmmj/distinfo
Added Files:
	mlmmj/patches/patch-reduce-subscription-confirmation-address-length.diff

Log Message:
Add a patch so mlmmj works inside RFC limits for sender address.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ddd66ab9209a1069963021e00659c5b4ec621db7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mlmmj/Makefile                                     |  1 +
 mlmmj/distinfo                                     |  1 +
 ...e-subscription-confirmation-address-length.diff | 89 ++++++++++++++++++++++
 3 files changed, 91 insertions(+)

diffs:
diff --git a/mlmmj/Makefile b/mlmmj/Makefile
index b75755b4c5..8079eab6b1 100644
--- a/mlmmj/Makefile
+++ b/mlmmj/Makefile
@@ -1,6 +1,7 @@
 # $NetBSD: Makefile,v 1.6 2014/08/22 01:37:13 schmonz Exp $
 
 DISTNAME=	mlmmj-1.3.0
+PKGREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	${HOMEPAGE:=releases/}
 EXTRACT_SUFX=	.tar.bz2
diff --git a/mlmmj/distinfo b/mlmmj/distinfo
index c7a97e4127..c236176ebe 100644
--- a/mlmmj/distinfo
+++ b/mlmmj/distinfo
@@ -4,3 +4,4 @@ SHA1 (mlmmj-1.3.0.tar.bz2) = e11652dfe1b74f87034914eb79302944cfb89b4f
 RMD160 (mlmmj-1.3.0.tar.bz2) = 6353f546342593adc76d17e178f702dc340a1586
 SHA512 (mlmmj-1.3.0.tar.bz2) = c704d89f8a96c0ffc751a744ffdefb5e4304ab74be89292f06ce0c337b8ff1cc5a91737c8b1bd96fe3e993338986fa42bf360cfefc508e1eac74ab88ffda2494
 Size (mlmmj-1.3.0.tar.bz2) = 292519 bytes
+SHA1 (patch-reduce-subscription-confirmation-address-length.diff) = 404b15624af9c4d35bb8476496b449b1cf73c95c
diff --git a/mlmmj/patches/patch-reduce-subscription-confirmation-address-length.diff b/mlmmj/patches/patch-reduce-subscription-confirmation-address-length.diff
new file mode 100644
index 0000000000..d637e751cc
--- /dev/null
+++ b/mlmmj/patches/patch-reduce-subscription-confirmation-address-length.diff
@@ -0,0 +1,89 @@
+From cb0788bc35c471a87fc75aca6d4e405fdbaccfd8 Mon Sep 17 00:00:00 2001
+From: Geert Stappers <stappers%stappers.it@localhost>
+Date: Thu, 25 May 2017 09:17:55 +0200
+Subject: [PATCH] Reduce subscription confirmation address length to fit RFC
+ 5321
+
+The local part of mailing list subscription confirmation addresses
+formed of:
+
+  mailing-list-name "+confsub-" 16-random-hex "-" sender-address
+
+can get very long, especially if sender-address is long.
+However, RFC limits it at 64 characters.
+
+Closes http://mlmmj.org/bugs/bug.php?id=63
+
+Reported-by: mgorny%gentoo.org@localhost
+---
+ src/mlmmj-sub.c   |  2 +-
+ src/mlmmj-unsub.c |  2 +-
+ src/strgen.c      | 23 +----------------------
+ 3 files changed, 3 insertions(+), 24 deletions(-)
+
+diff --git a/src/mlmmj-sub.c b/src/mlmmj-sub.c
+index 3335817..5c8c1ae 100644
+--- src/mlmmj-sub.c
++++ src/mlmmj-sub.c
+@@ -413,7 +413,7 @@ void generate_subconfirm(const char *listdir, const char *listaddr,
+         do {
+                 myfree(confirmfilename);
+                 myfree(randomstr);
+-		randomstr = random_plus_addr(subaddr);
++		randomstr = random_str();
+                 confirmfilename = concatstr(3, listdir, "/subconf/",
+ 					    randomstr);
+ 
+diff --git a/src/mlmmj-unsub.c b/src/mlmmj-unsub.c
+index 0fa42a1..8e13f3c 100644
+--- src/mlmmj-unsub.c
++++ src/mlmmj-unsub.c
+@@ -171,7 +171,7 @@ void generate_unsubconfirm(const char *listdir, const char *listaddr,
+         do {
+                 myfree(confirmfilename);
+                 myfree(randomstr);
+-		randomstr = random_plus_addr(subaddr);
++		randomstr = random_str();
+                 confirmfilename = concatstr(3, listdir, "/unsubconf/",
+ 					    randomstr);
+ 
+diff --git a/src/strgen.c b/src/strgen.c
+index f13db47..673f44a 100644
+--- src/strgen.c
++++ src/strgen.c
+@@ -40,31 +40,10 @@
+ 
+ char *random_str()
+ {
+-	size_t len = 17;
++	size_t len = 17; /* sixteen hex digits plus terminating zero */
+ 	char *dest = mymalloc(len);
+ 
+ 	snprintf(dest, len, "%08x%08x", random_int(), random_int());
+-
+-	return dest;
+-}
+-
+-char *random_plus_addr(const char *addr)
+-{
+-	size_t len = strlen(addr) + 128;
+-	char *dest = mymalloc(len);
+-	char *atsign;
+-	char *tmpstr;
+-
+-	tmpstr = mymalloc(len);
+-	snprintf(tmpstr, len, "%s", addr);
+-
+-	atsign = strchr(tmpstr, '@');
+-	MY_ASSERT(atsign);
+-	*atsign = '=';
+-
+-	snprintf(dest, len, "%08x%08x-%s", random_int(), random_int(), tmpstr);
+-
+-	myfree(tmpstr);
+ 	
+ 	return dest;
+ }
+-- 
+2.11.0
+


Home | Main Index | Thread Index | Old Index