Added mail-filter/razor.

This commit is contained in:
László Valkó 2017-04-25 19:42:47 +02:00
parent 2a7b1eb69a
commit 9a5573e935
6 changed files with 263 additions and 0 deletions

View file

@ -0,0 +1,6 @@
AUX razor-2.85-cosmetic-pv-fix.patch 616 SHA256 9b9e40a6ce0220bb2228dd7807a14ecd7febe5290ace74744eea90ab9ab13aa5 SHA512 c7e7985e779185d704d88ff4c39d106df46ba20daee92c4a4410e8a1af7d4c31bdca0646018fb5d1f7d58e106036c8442a0fa2635b39a5e1df2a259f79eced91 WHIRLPOOL 2b24691be6b3d3a1141f5fbcfe19298925b393c2870153ec08fa5fa91fb9385c948a777671616486ef4db1f7f61176343a1326c16ae4df8674a4b01c78f23447
AUX razor-2.85-fix-makefile.patch 442 SHA256 2787268d2693f5b02a729190d7ca19863dbc357cfbabaa2af58264247361d238 SHA512 5e0f9f9a4e59d0e0f243dd70dda14c780abb8b3451dfc35c36dfb3c79ab8911b4657d871c25017bab8d18bbd20d204f35be3beff9b7cd3caf74dbf2cff025811 WHIRLPOOL 4104d9381ee9186a50494bb733244cbd3e866bf62d1aafc9306397f0ba2b0bd1a706719eb69278a62d333310bd11517cd420af24f0f2533f9cd922d76067bf76
AUX razor-2.85-use-sha-not-sha1.patch 3897 SHA256 055ffbf3d46d4cd1991bb7dd4717243b2c772e7ac6aede6596097673e8b78551 SHA512 891a93408f56bb6a7b43814a501cce8775c51abe7cf227c39dd18699ac5f4c1aa5484842435edda58f7141a87e5ebe1496bfe959afab09fb44c3558c66511289 WHIRLPOOL 44d3817e358b82bc12331900f425bdaa27fb862bc8a65de6298cf959cf2ce7247a6d29be5e41d3a8934cbfb41943afb44dd551d3ca0db6239a6ed8c169920486
DIST razor-agents-2.85.tar.bz2 81691 SHA256 7fe0afe73e5b3979444dd86e2ad25ea99bc05b23d5648d357544f78f0b6eb6d7 SHA512 31dded1969dde963389a5939514c29638ad07f45dbb2f4c633cf20ebc4abab94e65e9a6d8885233cdde686ef365aab11fa5eba2ca38d79c5b8fab689143ff5db WHIRLPOOL 6c8f98e8f1090204fb9e4f53f5f53fe810034829f781226bb156e23d2297d1a420e616be1b8ef8adfcecda358ef4d74e3d620d71f28d92490ca6c706bac53a43
EBUILD razor-2.85-r2.ebuild 2757 SHA256 de60f634fa84eadae4d32e7bcb61055d8804d04a3b3be56c4fdd43cc2d4d42eb SHA512 cc5fa4467597de39bc2c9f626eb6297284e144f06ff9cee4fde551f918bf9231f2c63e54fd1944bf0388d0c5083f52d43ba35a5ee56b1fb5c7d2d011db4c81e3 WHIRLPOOL 21897c3a811fbca3f6da90ff5dccc999256b04612fc584d5b650be5ed078ee339298b33621f057ccbf42c8a259b10c7fdbba96525b34f9c5f37c1e7a9fb1cbbf
MISC metadata.xml 705 SHA256 cf624ad7622f80e9f07b113967c4a6d61bcd14d83e3ace44d243a23078fa2a23 SHA512 7634caefc54a09f7c83ae77103110e4f48641b1d6f1a091951a9e969c934303bdb4227120eec35cf46c1000f414782436c7eb8248f59b8bd4dcd4dbcce1047b7 WHIRLPOOL ee133283488123abb7bf1ed070eaaabe80e45adb1178efc721fd0bbfed9ecc94f0911eef882e79cec172d307f2bf6b1c218cbb54219b8316c957b0fb97453bd7

View file

@ -0,0 +1,22 @@
--- a/lib/Razor2/Client/Version.pm 2007-05-10 22:32:10.000000000 +0200
+++ b/lib/Razor2/Client/Version.pm 2010-03-25 11:11:36.911409707 +0100
@@ -14,7 +14,7 @@
$PROTOCOL = 3;
-$VERSION = '2.84';
+$VERSION = '2.85';
1;
--- a/META.yml 2007-05-23 20:29:34.000000000 +0200
+++ b/META.yml 2010-03-25 11:11:43.691408628 +0100
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: razor-agents
-version: 2.84
+version: 2.85
version_from: lib/Razor2/Client/Version.pm
installdirs: site
requires:

View file

@ -0,0 +1,14 @@
--- Makefile.PL.orig 2007-05-09 00:47:53.000000000 +0200
+++ Makefile.PL 2017-04-25 19:38:38.082079219 +0200
@@ -140,9 +140,9 @@
my $inherited = $self->SUPER::install(@_);
my $man5 = q{ \\
- $(INST_MAN5DIR) $(INSTALLMAN5DIR)};
+ "$(INST_MAN5DIR)" "$(INSTALLMAN5DIR)"};
- $inherited =~ s/(\$\((?:DEST)?INSTALL\w*MAN1DIR\))/$1$man5/gm;
+ $inherited =~ s/("\$\((?:DEST)?INSTALL\w*MAN1DIR\)")/$1$man5/gm;
return $inherited;
}

View file

@ -0,0 +1,119 @@
Patch-URL: http://cvs.fedoraproject.org/viewvc/devel/perl-Razor-Agent/razor-agents-2.85-use-sha-not-sha1.patch?view=log
diff -urN razor-agents-2.85.orig/lib/Razor2/Client/Engine.pm razor-agents-2.85/lib/Razor2/Client/Engine.pm
--- razor-agents-2.85.orig/lib/Razor2/Client/Engine.pm 2005-06-13 19:42:25.000000000 -0400
+++ razor-agents-2.85/lib/Razor2/Client/Engine.pm 2009-11-01 13:45:08.125369192 -0500
@@ -1,7 +1,6 @@
package Razor2::Client::Engine;
use strict;
-use Digest::SHA1 qw(sha1_hex);
use Data::Dumper;
use Razor2::Signature::Ephemeral;
use Razor2::Engine::VR8;
diff -urN razor-agents-2.85.orig/lib/Razor2/Signature/Ephemeral.pm razor-agents-2.85/lib/Razor2/Signature/Ephemeral.pm
--- razor-agents-2.85.orig/lib/Razor2/Signature/Ephemeral.pm 2003-03-03 18:09:50.000000000 -0500
+++ razor-agents-2.85/lib/Razor2/Signature/Ephemeral.pm 2009-11-01 13:45:08.125369192 -0500
@@ -2,9 +2,13 @@
package Razor2::Signature::Ephemeral;
use strict;
-use Digest::SHA1;
use Data::Dumper;
+BEGIN {
+ eval { require Digest::SHA; import Digest::SHA qw(sha1_hex); 1 }
+ or do { require Digest::SHA1; import Digest::SHA1 qw(sha1_hex) }
+}
+
sub new {
my ($class, %args) = @_;
@@ -86,16 +90,12 @@
}
my $digest;
- my $ctx = Digest::SHA1->new;
if ($seclength > 128) {
- $ctx->add($section1);
- $ctx->add($section2);
- $digest = $ctx->hexdigest;
+ $digest = sha1_hex($section1, $section2);
} else {
debug("Sections too small... reverting back to orginal content.");
- $ctx->add($content);
- $digest = $ctx->hexdigest;
+ $digest = sha1_hex($content);
}
debug("Computed e-hash is $digest");
diff -urN razor-agents-2.85.orig/lib/Razor2/Signature/Whiplash.pm razor-agents-2.85/lib/Razor2/Signature/Whiplash.pm
--- razor-agents-2.85.orig/lib/Razor2/Signature/Whiplash.pm 2007-05-08 18:22:36.000000000 -0400
+++ razor-agents-2.85/lib/Razor2/Signature/Whiplash.pm 2009-11-01 13:45:08.124368017 -0500
@@ -7,7 +7,10 @@
package Razor2::Signature::Whiplash;
-use Digest::SHA1;
+BEGIN {
+ eval { require Digest::SHA; import Digest::SHA qw(sha1_hex); 1 }
+ or do { require Digest::SHA1; import Digest::SHA1 qw(sha1_hex) }
+}
sub new {
@@ -683,13 +686,8 @@
# the value of length to the nearest multiple of ``length_error''.
# Take the first 20 hex chars from SHA1 and call it the signature.
- my $sha1 = Digest::SHA1->new();
-
- $sha1->add($host);
- $sig = substr $sha1->hexdigest, 0, 12;
-
- $sha1->add($corrected_length);
- $sig .= substr $sha1->hexdigest, 0, 4;
+ $sig = substr sha1_hex($host), 0, 12;
+ $sig .= substr sha1_hex($corrected_length), 0, 4;
push @sigs, $sig;
$sig_meta{$sig} = [$host, $corrected_length];
diff -urN razor-agents-2.85.orig/lib/Razor2/String.pm razor-agents-2.85/lib/Razor2/String.pm
--- razor-agents-2.85.orig/lib/Razor2/String.pm 2005-06-13 17:09:59.000000000 -0400
+++ razor-agents-2.85/lib/Razor2/String.pm 2009-11-01 13:45:08.123368518 -0500
@@ -1,11 +1,15 @@
# $Id$
package Razor2::String;
-use Digest::SHA1 qw(sha1_hex);
use URI::Escape;
use Razor2::Preproc::enBase64;
use Data::Dumper;
+BEGIN {
+ eval { require Digest::SHA; import Digest::SHA qw(sha1_hex); 1 }
+ or do { require Digest::SHA1; import Digest::SHA1 qw(sha1_hex) }
+}
+
#use MIME::Parser;
require Exporter;
@@ -69,15 +73,8 @@
return unless $text && $iv1 && $iv2;
die "no ref's allowed" if ref($text);
- my $ctx = Digest::SHA1->new;
- $ctx->add($iv2);
- $ctx->add($text);
- my $digest = $ctx->hexdigest;
-
- $ctx = Digest::SHA1->new;
- $ctx->add($iv1);
- $ctx->add($digest);
- $digest = $ctx->hexdigest;
+ my $digest = sha1_hex($iv2, $text);
+ $digest = sha1_hex($iv1, $digest);
return (hextobase64($digest), $digest);
}

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<maintainer type="project">
<email>net-mail@gentoo.org</email>
<name>Net-Mail</name>
</maintainer>
<maintainer type="person">
<email>razor-admin@cloudmark.com</email>
<description>
A contact designated by upstream developers. This email address
should always be added to CC list of any Razor bug that needs
upstream care.
</description>
</maintainer>
<upstream>
<remote-id type="sourceforge">razor</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1,79 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit perl-module
MY_PN="razor-agents"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Vipul's Razor is a distributed, collaborative spam detection and filtering network"
HOMEPAGE="http://razor.sourceforge.net/"
SRC_URI="mirror://sourceforge/razor/${MY_P}.tar.bz2"
LICENSE="Artistic"
SLOT="0"
KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
# This package warrants IUSE doc
IUSE=""
DEPEND=""
RDEPEND="dev-perl/Net-DNS
virtual/perl-Net-Ping
virtual/perl-Time-HiRes
|| ( virtual/perl-Digest-SHA dev-perl/Digest-SHA1 )
dev-perl/URI
dev-perl/Digest-Nilsimsa"
PATCHES=(
"${FILESDIR}/${PN}-2.85-use-sha-not-sha1.patch"
"${FILESDIR}/${PN}-2.85-cosmetic-pv-fix.patch"
"${FILESDIR}/${PN}-2.85-fix-makefile.patch"
)
S=${WORKDIR}/${MY_P}
# Install docs/ content
mydoc="docs/*"
SRC_TEST="do parallel"
pkg_postinst() {
elog
elog "Run 'razor-admin -create' to create a default config file in your"
elog "home directory under /home/user/.razor. (Remember to change user to"
elog "your username from root before running razor-admin)"
elog
elog "Razor v2 requires reporters to be registered so their reputations can"
elog "be computed over time and they can participate in the revocation"
elog "mechanism. Registration is done with razor-admin -register. It has to be"
elog "manually invoked in either of the following ways:"
elog
elog "To register user foo with 's1kr3t' as password: "
elog
elog "razor-admin -register -user=foo -pass=s1kr3t"
elog
elog "To register with an email address and have the password assigned:"
elog
elog "razor-admin -register -user=foo@bar.com "
elog
elog "To have both (random) username and password assgined: "
elog
elog "razor-admin -register "
elog
elog "razor-admin -register negotiates a registration with the Nomination Server"
elog "and writes the identity information in"
elog "/home/user/.razor/identity-username, or /etc/razor/identity-username"
elog "when invoked as root."
elog
elog "You can edit razor-agent.conf to change the defaults. Config options"
elog "and their values are defined in the razor-agent.conf(5) manpage."
elog
elog "The next step is to integrate razor-check, razor-report and"
elog "razor-revoke in your mail system. If you are running Razor v1, the"
elog "change will be transparent, new versions of razor agents will overwrite"
elog "the old ones. You would still need to plugin razor-revoke in your MUA,"
elog "since it's a new addition in Razor v2. If you are not running Razor v1,"
elog "refer to manpages of razor-check(1), razor-report(1), and"
elog "razor-revoke(1) for integration instructions."
elog
}