summaryrefslogtreecommitdiff
path: root/mail-filter/libspf2
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /mail-filter/libspf2
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'mail-filter/libspf2')
-rw-r--r--mail-filter/libspf2/Manifest2
-rw-r--r--mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch61
-rw-r--r--mail-filter/libspf2/libspf2-1.2.10.ebuild45
-rw-r--r--mail-filter/libspf2/libspf2-1.2.9-r3.ebuild43
-rw-r--r--mail-filter/libspf2/metadata.xml6
5 files changed, 157 insertions, 0 deletions
diff --git a/mail-filter/libspf2/Manifest b/mail-filter/libspf2/Manifest
new file mode 100644
index 00000000000..7f425ee09ce
--- /dev/null
+++ b/mail-filter/libspf2/Manifest
@@ -0,0 +1,2 @@
+DIST libspf2-1.2.10.tar.gz 508842 SHA256 d91e3de81ae287a2976c44f60283bd3000d720e6a112dc7142eedf1831b821c9 SHA512 162ce382628c6fcadac3e11f5a12442db622bb23f7ec503e16f5ba7fc88afdd777bce6b093c12a58210355985fd11b74b140f08fab347334d82d953dd183b130 WHIRLPOOL 0bc14a6c3e6ddf431cc98ed4b9dbd4e2ca381f6e408c8ea57d9a74d55a6079731d42644f6e60a3138996a9728137721cfb438463b36c18e89c7c381f9ed18e69
+DIST libspf2-1.2.9.tar.gz 518001 SHA256 4837f6b063b1431673754cbf6bef8979de5ffc4d7f26f6b93abd42787ba04862 SHA512 3137571f438704c176c5251e7b93fd0a8b6b04e52ad37218685b42b1fc5da6286baee578da1a14291d185216bd2a909cca3e55d64ffe580e71be059d1043a248 WHIRLPOOL 6579abf5080c319030ed7200d21b7bdfd3d4cf8207b4f3e6132be485024959bc06536fadf9d8c6898911ffa19977f738ec6a65d268d64d8aea06f89e94278e5e
diff --git a/mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch b/mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch
new file mode 100644
index 00000000000..76e8cd37c27
--- /dev/null
+++ b/mail-filter/libspf2/files/libspf2-1.2.9-ipv6.patch
@@ -0,0 +1,61 @@
+$NetBSD: patch-aa,v 1.1 2009/09/08 10:36:27 tron Exp $
+
+Fix an abort() caused by miscalculating the size of an internal buffer.
+This can crash applications using "libspf2" (e.g. "milter-greylist")
+in an e-mail gets delivered via SMTP over IPv6 depending on the
+remote machine's IPv6 address.
+
+--- src/libspf2/spf_expand.c.orig 2008-11-03 21:29:00.000000000 +0000
++++ src/libspf2/spf_expand.c 2009-09-08 11:27:52.000000000 +0100
+@@ -245,7 +245,7 @@
+ case PARM_CLIENT_IP: /* SMTP client IP */
+ #ifdef COMPUTE
+ if (compute_length) {
+- len = sizeof(ip6_buf);
++ len = sizeof(ip6_rbuf);
+ if (d->dv.url_encode)
+ len *= 3;
+ buflen += len;
+
+http://www.gossamer-threads.com/lists/spf/devel/35098
+
+--- src/libspf2/spf_compile.c 2008-11-03 15:37:33.000000000 -0500
++++ src/libspf2/spf_compile.c 2009-09-07 23:46:02.000000000 -0400
+@@ -778,7 +778,7 @@
+ const char *end;
+ const char *p;
+
+- char buf[ INET_ADDRSTRLEN ];
++ char buf[ INET6_ADDRSTRLEN ];
+ size_t len;
+ int err;
+
+--- src/libspf2/spf_interpret.c 2008-10-22 11:47:43.000000000 -0400
++++ src/libspf2/spf_interpret.c 2009-09-08 00:42:25.000000000 -0400
+@@ -505,7 +505,7 @@
+ char dst_ip6_buf[ INET6_ADDRSTRLEN ];
+
+ struct in6_addr src_ipv6;
+- int cidr, mask;
++ int cidr, cidr_save, mask;
+ int i;
+ int match;
+
+@@ -517,6 +517,7 @@
+ cidr = SPF_i_mech_cidr(spf_request, mech);
+ if ( cidr == 0 )
+ cidr = 128;
++ cidr_save = cidr;
+
+ match = TRUE;
+ for( i = 0; i < array_elem( ipv6.s6_addr ) && match; i++ )
+@@ -538,7 +539,7 @@
+ INET_NTOP(AF_INET6, &ipv6.s6_addr,
+ dst_ip6_buf, sizeof(dst_ip6_buf));
+ SPF_debugf( "ip_match: %s == %s (/%d): %d",
+- src_ip6_buf, dst_ip6_buf, cidr, match );
++ src_ip6_buf, dst_ip6_buf, cidr_save, match );
+ }
+
+ return match;
+
diff --git a/mail-filter/libspf2/libspf2-1.2.10.ebuild b/mail-filter/libspf2/libspf2-1.2.10.ebuild
new file mode 100644
index 00000000000..36f940e9bb6
--- /dev/null
+++ b/mail-filter/libspf2/libspf2-1.2.10.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+DESCRIPTION="libspf2 implements the Sender Policy Framework, a part of the SPF/SRS protocol pair"
+HOMEPAGE="http://www.libspf2.org"
+SRC_URI="http://www.libspf2.org/spf/libspf2-${PV}.tar.gz"
+
+LICENSE="|| ( LGPL-2.1 BSD-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ~ppc64 sparc x86 ~x86-fbsd"
+IUSE="static static-libs"
+
+DEPEND=""
+RDEPEND="!dev-perl/Mail-SPF-Query"
+REQUIRED_USE="static? ( static-libs )"
+
+src_prepare() {
+ if ! use static; then
+ sed -i -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \
+ -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \
+ -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \
+ -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am \
+ || die
+ #eautoreconf
+ fi
+
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README TODO INSTALL
+
+ use static-libs || rm -f "${D}"/usr/lib*/libspf2.la
+}
diff --git a/mail-filter/libspf2/libspf2-1.2.9-r3.ebuild b/mail-filter/libspf2/libspf2-1.2.9-r3.ebuild
new file mode 100644
index 00000000000..03a72f617c3
--- /dev/null
+++ b/mail-filter/libspf2/libspf2-1.2.9-r3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils autotools
+
+DESCRIPTION="libspf2 implements the Sender Policy Framework, a part of the SPF/SRS protocol pair"
+HOMEPAGE="http://www.libspf2.org"
+SRC_URI="http://www.libspf2.org/spf/libspf2-${PV}.tar.gz"
+
+LICENSE="|| ( LGPL-2.1 BSD-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="static static-libs"
+
+DEPEND=""
+RDEPEND="!dev-perl/Mail-SPF-Query"
+REQUIRED_USE="static? ( static-libs )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-ipv6.patch"
+ if ! use static; then
+ sed -i -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \
+ -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \
+ -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \
+ -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am \
+ || die
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README TODO INSTALL
+
+ use static-libs || rm -f "${D}"/usr/lib*/libspf2.la
+}
diff --git a/mail-filter/libspf2/metadata.xml b/mail-filter/libspf2/metadata.xml
new file mode 100644
index 00000000000..b511e7fe1c4
--- /dev/null
+++ b/mail-filter/libspf2/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-mail</herd>
+<longdescription>libspf2 implements the Sender Policy Framework, a part of the SPF/SRS protocol pair. libspf2 is a library which allows email systems such as Sendmail, Postfix, Exim, Zmailer and MS Exchange to check SPF records and make sure that the email is authorized by the domain name that it is coming from. This prevents email forgery, commonly used by spammers, scammers and email viruses/worms.</longdescription>
+</pkgmetadata>