summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2009-03-08 18:31:50 +0000
committerAlin Năstac <mrness@gentoo.org>2009-03-08 18:31:50 +0000
commit62aacb20e278c3f8c5d76ee9bcf7ec2042b43849 (patch)
treefb29e0935d424a34c5098d79eeb538b2f997ea81 /mail-filter/sid-milter
parentamd64/x86 stable, bug #260604 (diff)
downloadgentoo-2-62aacb20e278c3f8c5d76ee9bcf7ec2042b43849.tar.gz
gentoo-2-62aacb20e278c3f8c5d76ee9bcf7ec2042b43849.tar.bz2
gentoo-2-62aacb20e278c3f8c5d76ee9bcf7ec2042b43849.zip
Ignore SPF policies in SenderID PRA checks when -n argument is passed on command line.
(Portage version: 2.1.6.7/cvs/Linux x86_64)
Diffstat (limited to 'mail-filter/sid-milter')
-rw-r--r--mail-filter/sid-milter/ChangeLog9
-rw-r--r--mail-filter/sid-milter/files/sid-milter-1.0.0-nopra_on_spf1.patch57
-rw-r--r--mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild60
3 files changed, 125 insertions, 1 deletions
diff --git a/mail-filter/sid-milter/ChangeLog b/mail-filter/sid-milter/ChangeLog
index c86342de66ea..104e50ef94c5 100644
--- a/mail-filter/sid-milter/ChangeLog
+++ b/mail-filter/sid-milter/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for mail-filter/sid-milter
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/sid-milter/ChangeLog,v 1.9 2009/03/01 08:46:05 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/sid-milter/ChangeLog,v 1.10 2009/03/08 18:31:50 mrness Exp $
+
+*sid-milter-1.0.0-r2 (08 Mar 2009)
+
+ 08 Mar 2009; Alin Năstac <mrness@gentoo.org>
+ +files/sid-milter-1.0.0-nopra_on_spf1.patch, +sid-milter-1.0.0-r2.ebuild:
+ Ignore SPF policies in SenderID PRA checks when -n argument is passed on
+ command line.
*sid-milter-1.0.0-r1 (01 Mar 2009)
diff --git a/mail-filter/sid-milter/files/sid-milter-1.0.0-nopra_on_spf1.patch b/mail-filter/sid-milter/files/sid-milter-1.0.0-nopra_on_spf1.patch
new file mode 100644
index 000000000000..868a2d9ecd55
--- /dev/null
+++ b/mail-filter/sid-milter/files/sid-milter-1.0.0-nopra_on_spf1.patch
@@ -0,0 +1,57 @@
+diff -Nru sid-milter-1.0.0.orig/sid-filter/sid-filter.c sid-milter-1.0.0/sid-filter/sid-filter.c
+--- sid-milter-1.0.0.orig/sid-filter/sid-filter.c 2009-03-08 09:51:00.000000000 +0000
++++ sid-milter-1.0.0/sid-filter/sid-filter.c 2009-03-08 16:29:24.000000000 +0000
+@@ -1279,30 +1279,35 @@
+ switch (scope)
+ {
+ case SM_SCOPE_PRA:
+-#ifdef _FFR_NH_MFROM
+- if ((strncasecmp(mreplies[rcount],
+- "spf2.0/pra",
+- 10) == 0) ||
+- (strncasecmp(mreplies[rcount],
+- "spf2.0/mfrom,pra",
+- 16) == 0))
+-#else /* _FFR_NH_MFROM */
+- if (strncasecmp(mreplies[rcount],
+- "spf2.0/pra", 10) == 0)
+-#endif /* _FFR_NH_MFROM */
++ if ((
++ (strncasecmp(mreplies[rcount],
++ "spf2.0/pra",
++ 10) == 0) ||
++ (strncasecmp(mreplies[rcount],
++ "spf2.0/mfrom,pra",
++ 16) == 0)) &&
++ (strncasecmp(policy,
++ "spf2.0/",
++ 7) != 0))
+ {
+ sm_strlcpy(policy,
+ mreplies[rcount],
+ sizeof policy);
+ }
+- else if (!nopraspf1 &&
+- (strncasecmp(mreplies[rcount],
+- "v=spf1", 6) == 0) &&
+- policy[0] == '\0')
++ else if (strncasecmp(mreplies[rcount],
++ "v=spf1", 6) == 0)
+ {
+- sm_strlcpy(policy,
+- mreplies[rcount],
+- sizeof policy);
++ if (nopraspf1)
++ {
++ memset(mreplies[rcount], '\0',
++ sizeof mreplies[rcount]);
++ }
++ else if (policy[0] == '\0')
++ {
++ sm_strlcpy(policy,
++ mreplies[rcount],
++ sizeof policy);
++ }
+ }
+ break;
+
diff --git a/mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild b/mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild
new file mode 100644
index 000000000000..6627db966cb6
--- /dev/null
+++ b/mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild,v 1.1 2009/03/08 18:31:50 mrness Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A milter-based application to provide Sender-ID verification service"
+HOMEPAGE="http://sourceforge.net/projects/sid-milter/"
+SRC_URI="mirror://sourceforge/sid-milter/${P}.tar.gz"
+
+LICENSE="Sendmail-Open-Source"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6"
+
+RDEPEND="dev-libs/openssl
+ >=sys-libs/db-3.2"
+DEPEND="${RDEPEND}
+ || ( mail-filter/libmilter mail-mta/sendmail )" # libmilter is a static library
+
+pkg_setup() {
+ enewgroup milter
+ enewuser milter -1 -1 -1 milter
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}" || die "source dir not found"
+ epatch "${FILESDIR}"/${P}-nopra_on_spf1.patch
+
+ local ENVDEF=""
+ use ipv6 && ENVDEF="${ENVDEF} -DNETINET6"
+ sed -e "s:@@CFLAGS@@:${CFLAGS}:" \
+ -e "s:@@ENVDEF@@:${ENVDEF}:" \
+ "${FILESDIR}/gentoo-config.m4" > "${S}/devtools/Site/site.config.m4" \
+ || die "failed to generate site.config.m4"
+}
+
+src_compile() {
+ emake -j1 CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ dodir /usr/bin
+ emake -j1 DESTDIR="${D}" SUBDIRS=sid-filter \
+ SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
+ install || die "make install failed"
+
+ newinitd "${FILESDIR}/sid-filter.init" sid-filter \
+ || die "newinitd failed"
+ newconfd "${FILESDIR}/sid-filter.conf" sid-filter \
+ || die "newconfd failed"
+
+ # man build is broken; do man page installation by hand
+ doman */*.8 || die "failed to install man pages"
+
+ # some people like docs
+ dodoc RELEASE_NOTES *.txt sid-filter/README || die "failed to install docs"
+}