--- /dev/null
+List control emails do not include customheaders, and can lead to RBL issues
+for forged senders.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar --exclude '*~' mlmmj-1.2.19.0.orig/src/mlmmj-process.c mlmmj-1.2.19.0/src/mlmmj-process.c
+--- mlmmj-1.2.19.0.orig/src/mlmmj-process.c 2014-03-23 17:57:24.000000000 -0700
++++ mlmmj-1.2.19.0/src/mlmmj-process.c 2016-05-04 13:50:26.034174788 -0700
+@@ -702,8 +702,19 @@
+ "output mail file");
+ exit(EXIT_FAILURE);
+ }
+- if(do_all_the_voodoo_here(rawmailfd, donemailfd, -1,
+- -1, delheaders,
++ /* hdrfd is checked in do_all_the_voodoo_here(), because the
++ * customheaders file might not exist */
++ headerfilename = concatstr(2, listdir, "/control/customheaders");
++ hdrfd = open(headerfilename, O_RDONLY);
++ myfree(headerfilename);
++
++ /* footfd is checked in do_all_the_voodoo_here(), see above */
++ footerfilename = concatstr(2, listdir, "/control/footer");
++ footfd = open(footerfilename, O_RDONLY);
++ myfree(footerfilename);
++
++ if(do_all_the_voodoo_here(rawmailfd, donemailfd, hdrfd,
++ footfd, delheaders,
+ NULL, &allheaders, NULL) < 0) {
+ log_error(LOG_ARGS, "do_all_the_voodoo_here");
+ exit(EXIT_FAILURE);
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+MY_PV="${PV/_rc/-RC}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="Mailing list managing made joyful"
+HOMEPAGE="http://mlmmj.org/"
+SRC_URI="http://mlmmj.org/releases/${MY_P}.tar.bz2"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+DEPEND="virtual/mta"
+S="${WORKDIR}/${MY_P}"
+
+DOCS="AUTHORS ChangeLog FAQ README* TODO TUNABLES UPGRADE"
+PATCHES=(
+ "${FILESDIR}"/mlmmj-1.2.19.0-listcontrol-customheaders.patch
+)
+
+src_configure() {
+ econf --enable-receive-strip
+}
+
+src_install() {
+ default
+
+ insinto /usr/share/mlmmj/texts
+ doins listtexts/*
+
+ insinto /usr/share/mlmmj
+ doins -r contrib/web/*
+}
+
+pkg_postinst() {
+ elog "mlmmj comes with serveral webinterfaces:"
+ elog "- One for user subscribing/unsubscribing"
+ elog "- One for admin tasks"
+ elog "both available in a php and perl module."
+ elog "For more info have a look in /usr/share/mlmmj"
+}