View | Details | Raw Unified | Return to bug 115369
Collapse All | Expand All

(-)/var/tmp/p5-Mail-SpamAssassin323/Makefile (-10 / +4 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	Mail-SpamAssassin
8
PORTNAME=	Mail-SpamAssassin
9
PORTVERSION=	3.2.1
9
PORTVERSION=	3.2.3
10
PORTREVISION=	1
11
CATEGORIES=	mail perl5
10
CATEGORIES=	mail perl5
12
MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
11
MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
13
MASTER_SITE_SUBDIR=	spamassassin/source/:apache Mail/:cpan
12
MASTER_SITE_SUBDIR=	spamassassin/source/:apache Mail/:cpan
Lines 17-23 Link Here
17
MAINTAINER=	scheidell@secnap.net
16
MAINTAINER=	scheidell@secnap.net
18
COMMENT=	A highly efficient mail filter for identifying spam
17
COMMENT=	A highly efficient mail filter for identifying spam
19
18
20
BUILD_DEPENDS=	p5-Net-DNS>=0.60:${PORTSDIR}/dns/p5-Net-DNS \
19
BUILD_DEPENDS=	
20
p5-Net-DNS>=0.60:${PORTSDIR}/dns/p5-Net-DNS \
21
		p5-IO-Zlib>=1.04:${PORTSDIR}/archivers/p5-IO-Zlib \
21
		p5-IO-Zlib>=1.04:${PORTSDIR}/archivers/p5-IO-Zlib \
22
		p5-HTML-Parser>=3.43:${PORTSDIR}/www/p5-HTML-Parser \
22
		p5-HTML-Parser>=3.43:${PORTSDIR}/www/p5-HTML-Parser \
23
		p5-IO-Compress-Zlib>=2.04:${PORTSDIR}/archivers/p5-IO-Compress-Zlib \
23
		p5-IO-Compress-Zlib>=2.04:${PORTSDIR}/archivers/p5-IO-Compress-Zlib \
Lines 97-103 Link Here
97
.if defined(WITH_DKIM)
97
.if defined(WITH_DKIM)
98
RUN_DEPENDS+=	p5-Mail-DKIM>=.20:${PORTSDIR}/mail/p5-Mail-DKIM
98
RUN_DEPENDS+=	p5-Mail-DKIM>=.20:${PORTSDIR}/mail/p5-Mail-DKIM
99
RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
99
RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
100
RUN_DEPENDS+=	p5-Mail-DomainKeys>=0.80:${PORTSDIR}/mail/p5-Mail-DomainKeys
100
RUN_DEPENDS+=	p5-Crypt-OpenSSL-RSA>=0.24:${PORTSDIR}/security/p5-Crypt-OpenSSL-RSA
101
.endif
101
.endif
102
102
103
.if defined(WITH_SACOMPILE)
103
.if defined(WITH_SACOMPILE)
Lines 212-218 Link Here
212
.endif
212
.endif
213
.if defined(WITH_DKIM)
213
.if defined(WITH_DKIM)
214
	${REINPLACE_CMD} -e '/DKIM/s/^#loadplugin/loadplugin/' ${WRKSRC}/rules/v312.pre
214
	${REINPLACE_CMD} -e '/DKIM/s/^#loadplugin/loadplugin/' ${WRKSRC}/rules/v312.pre
215
	${REINPLACE_CMD} -e '/DomainKeys/s/^#loadplugin/loadplugin/' ${WRKSRC}/rules/v310.pre
216
.endif
215
.endif
217
.if !defined(WITH_SPF_QUERY)
216
.if !defined(WITH_SPF_QUERY)
218
	${REINPLACE_CMD} -e '/SPF/s/^loadplugin/#loadplugin/' ${WRKSRC}/rules/init.pre
217
	${REINPLACE_CMD} -e '/SPF/s/^loadplugin/#loadplugin/' ${WRKSRC}/rules/init.pre
Lines 266-275 Link Here
266
265
267
.endif
266
.endif
268
	@${SED} -e 's#PREFIX#${PREFIX}#' ${PKGMESSAGE}
267
	@${SED} -e 's#PREFIX#${PREFIX}#' ${PKGMESSAGE}
269
270
.if ${PERL_LEVEL} < 500800
271
BUILD_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \
272
		${SITE_PERL}/${PERL_ARCH}/Storable.pm:${PORTSDIR}/devel/p5-Storable
273
.endif
274
268
275
.include <bsd.port.post.mk>
269
.include <bsd.port.post.mk>
(-)/var/tmp/p5-Mail-SpamAssassin323/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (Mail-SpamAssassin-3.2.1.tar.gz) = a7d51294c565999da01f212e5ad2a031
1
MD5 (Mail-SpamAssassin-3.2.3.tar.gz) = 2e356b70b9458b44a828c19f6e816521
2
SHA256 (Mail-SpamAssassin-3.2.1.tar.gz) = e0925d9c490bb8f1e56c3b850b50b12b124536dfe581b23d3c25715b1ce9ebf7
2
SHA256 (Mail-SpamAssassin-3.2.3.tar.gz) = 2bf7635555dea4912512a32c7c567094ef264770b86029c49f653e97352efad8
3
SIZE (Mail-SpamAssassin-3.2.1.tar.gz) = 1193561
3
SIZE (Mail-SpamAssassin-3.2.3.tar.gz) = 1202082
(-)/var/tmp/p5-Mail-SpamAssassin323/files/patch-ImageInfo.pm (-105 / +14 lines)
Lines 1-98 Link Here
1
--- ImageInfo.pm.orig	Tue May  1 09:54:09 2007
1
--- ImageInfo.pm.orig	Tue May  1 09:54:09 2007
2
+++ lib/Mail/SpamAssassin/Plugin/ImageInfo.pm	Thu May  3 16:08:29 2007
2
+++ lib/Mail/SpamAssassin/Plugin/ImageInfo.pm	Thu May  3 16:08:29 2007
3
@@ -1,10 +1,9 @@
3
@@ -49,6 +49,10 @@
4
 # <@LICENSE>
4
 #     body LARGE_IMAGE_AREA  eval:pixel_coverage('all',150000)
5
-# Licensed to the Apache Software Foundation (ASF) under one or more
5
 #     body SMALL_GIF_AREA  eval:pixel_coverage('gif',1,40000)
6
-# contributor license agreements.  See the NOTICE file distributed with
7
-# this work for additional information regarding copyright ownership.
8
-# The ASF licenses this file to you under the Apache License, Version 2.0
9
-# (the "License"); you may not use this file except in compliance with
10
-# the License.  You may obtain a copy of the License at:
11
+# Copyright 2004 Apache Software Foundation
12
+# 
13
+# Licensed under the Apache License, Version 2.0 (the "License");
14
+# you may not use this file except in compliance with the License.
15
+# You may obtain a copy of the License at
16
 # 
17
 #     http://www.apache.org/licenses/LICENSE-2.0
18
 # 
19
@@ -16,6 +15,36 @@
20
 # </@LICENSE>
21
 #
22
 # -------------------------------------------------------
23
+# ImageInfo Plugin for SpamAssassin
24
+# Version: 0.7
25
+# Current Home: http://www.rulesemporium.com/plugins.htm#imageinfo
26
+# Created: 2006-08-02
27
+# Modified: 2007-01-17
28
+# By: Dallas Engelken <dallase@uribl.com>
29
+#
30
+# Changes: 
31
+#   0.7 - added image_name_regex to allow pattern matching on the image name
32
+#       - added support for image/pjpeg content types (progressive jpeg)
33
+#       - updated imageinfo.cf with a few sample rules for using image_name_regex()
34
+#   0.6 - fixed dems_ bug in image_size_range_
35
+#   0.5 - added image_named and image_to_text_ratio
36
+#   0.4 - added image_size_exact and image_size_range
37
+#   0.3 - added jpeg support
38
+#   0.2 - optimized by theo
39
+#   0.1 - added gif/png support
40
+#
41
+# Files:
42
+#   ImageInfo.pm (plugin)  - http://www.rulesemporium.com/plugins/ImageInfo.pm
43
+#   imageinfo.cf (ruleset) - http://www.rulesemporium.com/plugins/imageinfo.cf
44
+#   
45
+# Install:
46
+#   1) place ruleset in your local config dir
47
+#   2) place plugin in your plugins dir 
48
+#   3) add to init.pre (or v310.pre) the following line
49
+#      loadplugin Mail::SpamAssassin::Plugin::ImageInfo
50
+#           or if not in plugin dir..
51
+#      loadplugin Mail::SpamAssassin::Plugin::ImageInfo /path/to/plugin
52
+#    4) restart spamd (if necessary)
53
 #
54
 # Usage:
55
 #  image_count()
56
@@ -27,7 +56,7 @@
57
 #        max: optional, if specified, message must not 
58
 #             contain more than this number of images
59
 #
6
 #
60
-#  examples
61
+#  image_count() examples
62
 # 
63
 #     body ONE_IMAGE  eval:image_count('all',1,1) 
64
 #     body ONE_OR_MORE_IMAGES  eval:image_count('all',1)
65
@@ -44,13 +73,24 @@
66
 #        max: optional, if specified, message must not
67
 #             contain more than this much pixel area
68
 #
69
-#  examples
70
+#   pixel_coverage() examples
71
+#
72
+#     body LARGE_IMAGE_AREA  eval:pixel_coverage('all',150000)  # catches any images that are 150k pixel/sq or higher
73
+#     body SMALL_GIF_AREA  eval:pixel_coverage('gif',1,40000)   # catches only gifs that 1 to 40k pixel/sql
74
+#
75
+#  image_name_regex()
76
+# 
77
+#     body RULENAME  eval:image_name_regex(<regex>) 
78
+#        regex: full quoted regexp, see examples below
79
+#
80
+#  image_name_regex() examples
7
+#  image_name_regex() examples
81
+#
8
+#
82
+#     body CG_DOUBLEDOT_GIF  eval:image_name_regex('/^\w{2,9}\.\.gif$/i') # catches double dot gifs  abcd..gif
9
+#     body CG_DOUBLEDOT_GIF  eval:image_name_regex('/^\w{2,9}\.\.gif$/i') # catches double dot gifs  abcd..gif
10
+#
11
 #  See the ruleset for ways to meta image_count() 
12
 #  and pixel_coverage() together.  
83
 #
13
 #
84
-#     body LARGE_IMAGE_AREA  eval:pixel_coverage('all',150000)
14
@@ -80,6 +84,7 @@
85
-#     body SMALL_GIF_AREA  eval:pixel_coverage('gif',1,40000)
86
+#  See the ruleset for more examples that arent documented here.
87
 #
88
-#  See the ruleset for ways to meta image_count() 
89
-#  and pixel_coverage() together.  
90
+#  New functions added in v0.5+ need some documentation here.  Or just 
91
+#  see .cf for sample rules.
92
 #
93
 # -------------------------------------------------------
94
 
95
@@ -80,6 +120,7 @@
96
   $self->register_eval_rule ("image_size_exact");
15
   $self->register_eval_rule ("image_size_exact");
97
   $self->register_eval_rule ("image_size_range");
16
   $self->register_eval_rule ("image_size_range");
98
   $self->register_eval_rule ("image_named");
17
   $self->register_eval_rule ("image_named");
Lines 100-109 Link Here
100
   $self->register_eval_rule ("image_to_text_ratio");
19
   $self->register_eval_rule ("image_to_text_ratio");
101
 
20
 
102
   return $self;
21
   return $self;
103
@@ -244,6 +285,34 @@
22
@@ -272,6 +277,33 @@
104
 
105
 # -----------------------------------------
106
 
23
 
24
   # dbg("imageinfo: pc_$type: $min, ".($max ? $max:'').", $type, ".$pms->{'imageinfo'}->{"pc_$type"});
25
   return result_check($min, $max, $pms->{'imageinfo'}->{"pc_$type"});
26
+}
27
+
28
+# -----------------------------------------
107
+sub image_name_regex {
29
+sub image_name_regex {
108
+  my ($self,$pms,$body,$re) = @_;
30
+  my ($self,$pms,$body,$re) = @_;
109
+  return unless (defined $re);
31
+  return unless (defined $re);
Lines 128-147 Link Here
128
+  }
50
+  }
129
+  return 0;
51
+  return 0;
130
+
52
+
131
+}
132
+
133
+# -----------------------------------------
134
+
135
 sub image_count {
136
   my ($self,$pms,$body,$type,$min,$max) = @_;
137
   
138
@@ -323,7 +392,8 @@
139
     $self->_get_images($pms);
140
   }
53
   }
141
 
54
 
142
-  return unless (exists $pms->{'imageinfo'}->{"dems_$type"});
55
 # -----------------------------------------
143
+  my $name = 'dems_'.$type;
144
+  return unless (exists $pms->{'imageinfo'}->{$name});
145
 
56
 
146
   foreach my $dem ( keys %{$pms->{'imageinfo'}->{"dems_$type"}}) {
147
     my ($h,$w) = split(/x/,$dem);
(-)/var/tmp/p5-Mail-SpamAssassin323/files/patch-sa-compile.raw (-4 / +6 lines)
Lines 1-6 Link Here
1
--- sa-compile.raw.orig	Tue May  1 09:54:33 2007
1
--- sa-compile.raw.orig	Mon Jul 23 10:47:06 2007
2
+++ sa-compile.raw	Thu May  3 13:35:23 2007
2
+++ sa-compile.raw	Wed Jul 25 20:23:14 2007
3
@@ -643,7 +643,7 @@
3
@@ -659,9 +659,9 @@
4
   -p prefs, --prefspath=file, --prefs-file=file
4
   -p prefs, --prefspath=file, --prefs-file=file
5
                                 Set user preferences file
5
                                 Set user preferences file
6
   --siteconfigpath=path         Path for site configs
6
   --siteconfigpath=path         Path for site configs
Lines 10-16 Link Here
10
-                     (default: /var/lib/spamassassin/compiled/<version>)
10
-                     (default: /var/lib/spamassassin/compiled/<version>)
11
+                     (default: @@LOCAL_STATE_DIR@@/compiled/<version>)
11
+                     (default: @@LOCAL_STATE_DIR@@/compiled/<version>)
12
   --cf='config line'            Additional line of configuration
12
   --cf='config line'            Additional line of configuration
13
@@ -692,12 +692,12 @@
13
   -D, --debug [area=n,...]	Print debugging messages
14
   -V, --version			Print version
15
@@ -708,12 +708,12 @@
14
 =item B<-C> I<path>, B<--configpath>=I<path>, B<--config-file>=I<path>
16
 =item B<-C> I<path>, B<--configpath>=I<path>, B<--config-file>=I<path>
15
 
17
 
16
 Use the specified path for locating the distributed configuration files.
18
 Use the specified path for locating the distributed configuration files.
(-)/var/tmp/p5-Mail-SpamAssassin323/files/patch-spamc-Makefile.in (-20 lines)
Lines 1-20 Link Here
1
--- spamc/Makefile.in~	Fri Jun  8 14:56:02 2007
2
+++ spamc/Makefile.in	Thu Jun 14 00:41:37 2007
3
@@ -7,4 +7,5 @@
4
 LDFLAGS = @LDFLAGS@
5
 LDDLFLAGS = @LDDLFLAGS@
6
+SHLIBFLAGS = -fPIC
7
 
8
 LIBS = @LIBS@
9
@@ -33,9 +34,9 @@
10
 
11
 spamc/libspamc$(SHLIBEXT): $(LIBSPAMC_FILES)
12
-	$(CC) $(CCDLFLAGS) $(LIBSPAMC_FILES) \
13
+	$(CC) $(CCDLFLAGS) $(SHLIBFLAGS) $(LIBSPAMC_FILES) \
14
 		-o $@ $(LDDLFLAGS) $(LIBS)
15
 
16
 spamc/libsslspamc$(SHLIBEXT): $(LIBSPAMC_FILES)
17
-	$(CC) $(SSLCFLAGS) $(CCDLFLAGS) $(LIBSPAMC_FILES) \
18
+	$(CC) $(SSLCFLAGS) $(CCDLFLAGS) $(SHLIBFLAGS) $(LIBSPAMC_FILES) \
19
 		-o $@ $(LDDLFLAGS) $(SSLLIBS) $(LIBS)
20
(-)/var/tmp/p5-Mail-SpamAssassin323/pkg-install (-1 / +1 lines)
Lines 1-5 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
2
PKG_PREFIX=${PKG_PREFIX:-/usr/local}
3
3
4
ask() {
4
ask() {
5
        local question default answer
5
        local question default answer

Return to bug 115369