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

(-)/usr/ports/japanese/p5-Mail-SpamAssassin/Makefile (-15 / +18 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	Mail-SpamAssassin
8
PORTNAME=	Mail-SpamAssassin
9
PORTVERSION=	3.3.1
9
PORTVERSION=	3.3.1
10
PORTREVISION=	2
10
PORTREVISION=	3
11
CATEGORIES=	japanese mail perl5
11
CATEGORIES=	japanese mail perl5
12
MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/} \
12
MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/} \
13
		${PATCH_SITES}
13
		${PATCH_SITES}
Lines 23-44 Link Here
23
PATCHLEVEL=	1
23
PATCHLEVEL=	1
24
PATCH_DIST_STRIP=	-p1
24
PATCH_DIST_STRIP=	-p1
25
25
26
RUN_DEPENDS+=
26
MAINTAINER=	fmysh@iijmio-mail.jp
27
MAINTAINER=	fmysh@iijmio-mail.jp
27
COMMENT=	SpamAssassin with Japanese tokenizer
28
COMMENT=	SpamAssassin with Japanese tokenizer
28
29
29
BUILD_DEPENDS=	p5-NetAddr-IP>=4.00.7:${PORTSDIR}/net-mgmt/p5-NetAddr-IP \
30
RUN_DEPENDS=	p5-NetAddr-IP>=4.00.7:${PORTSDIR}/net-mgmt/p5-NetAddr-IP \
30
		p5-Archive-Tar>=1.23:${PORTSDIR}/archivers/p5-Archive-Tar \
31
		p5-Net-DNS>=0.63:${PORTSDIR}/dns/p5-Net-DNS \
31
		p5-Net-DNS>=0.63:${PORTSDIR}/dns/p5-Net-DNS \
32
		p5-IO-Zlib>=1.04:${PORTSDIR}/archivers/p5-IO-Zlib \
33
		p5-HTML-Parser>=3.43:${PORTSDIR}/www/p5-HTML-Parser \
32
		p5-HTML-Parser>=3.43:${PORTSDIR}/www/p5-HTML-Parser \
34
		p5-Test-Harness>=3.16:${PORTSDIR}/devel/p5-Test-Harness \
35
		${SITE_PERL}/Bundle/LWP.pm:${PORTSDIR}/www/p5-libwww \
33
		${SITE_PERL}/Bundle/LWP.pm:${PORTSDIR}/www/p5-libwww \
36
		${SITE_PERL}/${PERL_ARCH}/Encode/Detect.pm:${PORTSDIR}/converters/p5-Encode-Detect \
34
		${SITE_PERL}/${PERL_ARCH}/Encode/Detect.pm:${PORTSDIR}/converters/p5-Encode-Detect \
37
		${SITE_PERL}/Mail/Internet.pm:${PORTSDIR}/mail/p5-Mail-Tools
35
		${SITE_PERL}/Mail/Internet.pm:${PORTSDIR}/mail/p5-Mail-Tools
36
RUN_DEPENDS+=	ja-p5-MeCab>=0.98:${PORTSDIR}/japanese/p5-MeCab
38
37
39
RUN_DEPENDS=	${BUILD_DEPENDS} \
38
BUILD_DEPENDS=	${RUN_DEPENDS}
40
		${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
41
		ja-p5-MeCab>=0.98:${PORTSDIR}/japanese/p5-MeCab
42
39
43
CONFLICTS=	p5-Mail-SpamAssassin-[0-9]*
40
CONFLICTS=	p5-Mail-SpamAssassin-[0-9]*
44
41
Lines 75-80 Link Here
75
RUN_DEPENDS+=	p5-IO-Compress>=2.017:${PORTSDIR}/archivers/p5-IO-Compress
72
RUN_DEPENDS+=	p5-IO-Compress>=2.017:${PORTSDIR}/archivers/p5-IO-Compress
76
.endif
73
.endif
77
74
75
.if ${PERL_LEVEL} < 501000
76
RUN_DEPENDS+=	p5-Archive-Tar>=1.23:${PORTSDIR}/archivers/p5-Archive-Tar \
77
		p5-IO-Zlib>=1.04:${PORTSDIR}/archivers/p5-IO-Zlib \
78
		p5-Test-Harness>=3.16:${PORTSDIR}/devel/p5-Test-Harness
79
.endif
80
78
.if defined (WITH_SPAMC)
81
.if defined (WITH_SPAMC)
79
CONFIGURE_ARGS+=	BUILD_SPAMC=yes
82
CONFIGURE_ARGS+=	BUILD_SPAMC=yes
80
.else
83
.else
Lines 84-90 Link Here
84
.endif
87
.endif
85
88
86
.if defined(WITH_SPF_QUERY)
89
.if defined(WITH_SPF_QUERY)
87
BUILD_DEPENDS+=	${SITE_PERL}/Mail/SPF.pm:${PORTSDIR}/mail/p5-Mail-SPF
90
RUN_DEPENDS+=	${SITE_PERL}/Mail/SPF.pm:${PORTSDIR}/mail/p5-Mail-SPF
88
.endif
91
.endif
89
.if !defined(WITHOUT_IPV6)
92
.if !defined(WITHOUT_IPV6)
90
RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/INET6.pm:${PORTSDIR}/net/p5-IO-Socket-INET6
93
RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/INET6.pm:${PORTSDIR}/net/p5-IO-Socket-INET6
Lines 117-136 Link Here
117
.if defined(WITH_RAZOR)
120
.if defined(WITH_RAZOR)
118
RUN_DEPENDS+=	razor-agents>=2.84:${PORTSDIR}/mail/razor-agents
121
RUN_DEPENDS+=	razor-agents>=2.84:${PORTSDIR}/mail/razor-agents
119
.else
122
.else
120
.if !defined(WITH_DKIM)
121
.if   ${PERL_LEVEL} < 501000
123
.if   ${PERL_LEVEL} < 501000
122
BUILD_DEPENDS+=	p5-Digest-SHA1>=2.11:${PORTSDIR}/security/p5-Digest-SHA1
124
.if !defined(WITH_DKIM)
125
RUN_DEPENDS+=	p5-Digest-SHA1>=2.11:${PORTSDIR}/security/p5-Digest-SHA1
123
.endif
126
.endif
124
.endif
127
.endif
125
.endif
128
.endif
126
129
127
.if defined(WITH_DKIM)
130
.if defined(WITH_DKIM)
128
BUILD_DEPENDS+=	${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
131
RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
129
. if ${PERL_LEVEL} < 501000
132
. if ${PERL_LEVEL} < 501000
130
BUILD_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/Digest/SHA.pm:${PORTSDIR}/security/p5-Digest-SHA
133
RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/Digest/SHA.pm:${PORTSDIR}/security/p5-Digest-SHA
131
. endif
134
. endif
132
BUILD_DEPENDS+=	p5-Mail-DKIM>=0.37:${PORTSDIR}/mail/p5-Mail-DKIM
135
RUN_DEPENDS+=	p5-Mail-DKIM>=0.37:${PORTSDIR}/mail/p5-Mail-DKIM
133
BUILD_DEPENDS+=	p5-Crypt-OpenSSL-RSA>=0.24:${PORTSDIR}/security/p5-Crypt-OpenSSL-RSA
136
RUN_DEPENDS+=	p5-Crypt-OpenSSL-RSA>=0.24:${PORTSDIR}/security/p5-Crypt-OpenSSL-RSA
134
.endif
137
.endif
135
138
136
.if defined(WITH_SACOMPILE)
139
.if defined(WITH_SACOMPILE)
(-)/usr/ports/japanese/p5-Mail-SpamAssassin/distinfo (-4 lines)
Lines 1-12 Link Here
1
MD5 (ja-spamassassin/Mail-SpamAssassin-3.3.1.tar.gz) = 5a93f81fda315411560ff5da099382d2
2
SHA256 (ja-spamassassin/Mail-SpamAssassin-3.3.1.tar.gz) = a11ca187150d5a8fc2904c4a50f29d3ff739294fa714aaab127ba692d65410ad
1
SHA256 (ja-spamassassin/Mail-SpamAssassin-3.3.1.tar.gz) = a11ca187150d5a8fc2904c4a50f29d3ff739294fa714aaab127ba692d65410ad
3
SIZE (ja-spamassassin/Mail-SpamAssassin-3.3.1.tar.gz) = 1196842
2
SIZE (ja-spamassassin/Mail-SpamAssassin-3.3.1.tar.gz) = 1196842
4
MD5 (ja-spamassassin/tokenizer.pre) = e8e787b76ab94805c7472a90f860cc0a
5
SHA256 (ja-spamassassin/tokenizer.pre) = 9f8e30a8449fd13d571427ea30a252b4b275f153bde5345c50427a7aee3c90e0
3
SHA256 (ja-spamassassin/tokenizer.pre) = 9f8e30a8449fd13d571427ea30a252b4b275f153bde5345c50427a7aee3c90e0
6
SIZE (ja-spamassassin/tokenizer.pre) = 163
4
SIZE (ja-spamassassin/tokenizer.pre) = 163
7
MD5 (ja-spamassassin/spamassassin-3.3.1-ja-1.txt) = 8bc5f94dcae6cd7c083fa2ce8ea8f75c
8
SHA256 (ja-spamassassin/spamassassin-3.3.1-ja-1.txt) = 8342ed8b783f0eae867df9749b8c2ef35d7d5bee00bc240624bab57cc5a03070
5
SHA256 (ja-spamassassin/spamassassin-3.3.1-ja-1.txt) = 8342ed8b783f0eae867df9749b8c2ef35d7d5bee00bc240624bab57cc5a03070
9
SIZE (ja-spamassassin/spamassassin-3.3.1-ja-1.txt) = 7163
6
SIZE (ja-spamassassin/spamassassin-3.3.1-ja-1.txt) = 7163
10
MD5 (ja-spamassassin/spamassassin-3.3.1-ja-1.patch) = ff49e2eb9808ed0377b56f8d26acbb1b
11
SHA256 (ja-spamassassin/spamassassin-3.3.1-ja-1.patch) = 39dd21525076b86134b421a99cbbe151feba66da7381003d4743044c852ee2d5
7
SHA256 (ja-spamassassin/spamassassin-3.3.1-ja-1.patch) = 39dd21525076b86134b421a99cbbe151feba66da7381003d4743044c852ee2d5
12
SIZE (ja-spamassassin/spamassassin-3.3.1-ja-1.patch) = 33740
8
SIZE (ja-spamassassin/spamassassin-3.3.1-ja-1.patch) = 33740
(-)/usr/ports/japanese/p5-Mail-SpamAssassin/files/patch-DKIM.pm (+66 lines)
Line 0 Link Here
1
--- lib/Mail/SpamAssassin/Plugin/DKIM.pm	(revision 925052)
2
+++ lib/Mail/SpamAssassin/Plugin/DKIM.pm	(working copy)
3
@@ -213,6 +213,19 @@
4
 in the SpamAssassin distribution.  The whitelist score is lower, because
5
 these are often targets for abuse of public mailers which sign their mail.
6
 
7
+=item unwhitelist_from_dkim author@example.com
8
+
9
+Removes an email address from def_whitelist_from_dkim and whitelist_from_dkim
10
+tables, if it exists. Useful for removing undesired default entries from a
11
+distributed configuration file by a local.cf file or by a C<user_prefs>.
12
+Note that a parameter is a single email address - currently that address
13
+is removed regardless of a signing-domain which may have been specified in a
14
+whitelisting entry.
15
+
16
+The specified email address has to match exactly the address previously
17
+used in a whitelist_from_dkim or def_whitelist_from_dkim directive
18
+(with an exception that its domain name part is matched case-insensitively).
19
+
20
 =item adsp_override domain [signing-practices]
21
 
22
 Currently few domains publish their signing practices (RFC 5617 - ADSP),
23
@@ -362,6 +375,7 @@
24
       }
25
       my $address = $1;
26
       my $sdid = defined $2 ? $2 : '';  # empty implies author domain signature
27
+      $address =~ s/(\@[^@]*)\z/lc($1)/e; # lowercase the email address domain
28
       $self->{parser}->add_to_addrlist_rcvd('whitelist_from_dkim',
29
                                             $address, $sdid);
30
     }
31
@@ -381,12 +395,32 @@
32
       }
33
       my $address = $1;
34
       my $sdid = defined $2 ? $2 : '';  # empty implies author domain signature
35
+      $address =~ s/(\@[^@]*)\z/lc($1)/e; # lowercase the email address domain
36
       $self->{parser}->add_to_addrlist_rcvd('def_whitelist_from_dkim',
37
                                             $address, $sdid);
38
     }
39
   });
40
 
41
   push (@cmds, {
42
+    setting => 'unwhitelist_from_dkim',
43
+    type => $Mail::SpamAssassin::Conf::CONF_TYPE_ADDRLIST,
44
+    code => sub {
45
+      my ($self, $key, $value, $line) = @_;
46
+      unless (defined $value && $value !~ /^$/) {
47
+        return $Mail::SpamAssassin::Conf::MISSING_REQUIRED_VALUE;
48
+      }
49
+      unless ($value =~ /^\S+$/) {
50
+        return $Mail::SpamAssassin::Conf::INVALID_VALUE;
51
+      }
52
+      $value =~ s/(\@[^@]*)\z/lc($1)/e;  # lowercase the email address domain
53
+      $self->{parser}->remove_from_addrlist_rcvd('whitelist_from_dkim',
54
+                                                 $value);
55
+      $self->{parser}->remove_from_addrlist_rcvd('def_whitelist_from_dkim',
56
+                                                 $value);
57
+    }
58
+  });
59
+
60
+  push (@cmds, {
61
     setting => 'adsp_override',
62
     type => $Mail::SpamAssassin::Conf::CONF_TYPE_HASH_KEY_VALUE,
63
     code => sub {
64
65
66
(-)/usr/ports/japanese/p5-Mail-SpamAssassin/files/patch-bug6392 (+225 lines)
Line 0 Link Here
1
Index: lib/Mail/SpamAssassin/HTML.pm
2
===================================================================
3
--- lib/Mail/SpamAssassin/HTML.pm	(revision 943932)
4
+++ lib/Mail/SpamAssassin/HTML.pm	(revision 943933)
5
@@ -191,7 +191,7 @@
6
   my $self = shift;
7
   my %options = @_;
8
 
9
-  return join('', @{ $self->{text} }) unless keys %options;
10
+  return join('', @{ $self->{text} }) unless %options;
11
 
12
   my $mask;
13
   while (my ($k, $v) = each %options) {
14
Index: lib/Mail/SpamAssassin/Dns.pm
15
===================================================================
16
--- lib/Mail/SpamAssassin/Dns.pm	(revision 943932)
17
+++ lib/Mail/SpamAssassin/Dns.pm	(revision 943933)
18
@@ -754,7 +754,7 @@
19
   dbg("dns: entering helper-app run mode");
20
   $self->{old_slash} = $/;              # Razor pollutes this
21
   %{$self->{old_env}} = ();
22
-  if ( defined %ENV ) {
23
+  if ( %ENV ) {
24
     # undefined values in %ENV can result due to autovivification elsewhere,
25
     # this prevents later possible warnings when we restore %ENV
26
     while (my ($key, $value) = each %ENV) {
27
Index: lib/Mail/SpamAssassin/Plugin/Check.pm
28
===================================================================
29
--- lib/Mail/SpamAssassin/Plugin/Check.pm	(revision 943932)
30
+++ lib/Mail/SpamAssassin/Plugin/Check.pm	(revision 943933)
31
@@ -307,64 +307,51 @@
32
   my $package_name = __PACKAGE__;
33
   my $methodname = $package_name."::_".$ruletype."_tests_".$clean_priority;
34
 
35
-  if (defined &{$methodname} && !$doing_user_rules) {
36
-run_compiled_method:
37
-  # dbg("rules: run_generic_tests - calling %s", $methodname);
38
-    my $t = Mail::SpamAssassin::Timeout->new({ deadline => $master_deadline });
39
-    my $err = $t->run(sub {
40
-      no strict "refs";
41
-      $methodname->($pms, @{$opts{args}});
42
-    });
43
-    if ($t->timed_out() && $master_deadline && time > $master_deadline) {
44
-      info("check: exceeded time limit in $methodname, skipping further tests");
45
-      $pms->{deadline_exceeded} = 1;
46
-    }
47
-    return;
48
-  }
49
+  if (!defined &{$methodname} || $doing_user_rules) {
50
 
51
-  # use %nopts for named parameter-passing; it's more friendly to future-proof
52
-  # subclassing, since new parameters can be added without breaking third-party
53
-  # subclassed implementations of this plugin.
54
-  my %nopts = (
55
-    ruletype => $ruletype,
56
-    doing_user_rules => $doing_user_rules,
57
-    priority => $priority,
58
-    clean_priority => $clean_priority
59
-  );
60
+    # use %nopts for named parameter-passing; it's more friendly
61
+    # to future-proof subclassing, since new parameters can be added without
62
+    # breaking third-party subclassed implementations of this plugin.
63
+    my %nopts = (
64
+      ruletype => $ruletype,
65
+      doing_user_rules => $doing_user_rules,
66
+      priority => $priority,
67
+      clean_priority => $clean_priority
68
+    );
69
 
70
-  # build up the eval string...
71
-  $self->{evalstr_methodname} = $methodname;
72
-  $self->{evalstr_chunk_current_methodname} = undef;
73
-  $self->{evalstr_chunk_methodnames} = [];
74
-  $self->{evalstr_chunk_prefix} = [];  # stack (array) of source code sections
75
-  $self->{evalstr} = ''; $self->{evalstr_l} = 0;
76
-  $self->{evalstr2} = '';
77
-  $self->begin_evalstr_chunk($pms);
78
+    # build up the eval string...
79
+    $self->{evalstr_methodname} = $methodname;
80
+    $self->{evalstr_chunk_current_methodname} = undef;
81
+    $self->{evalstr_chunk_methodnames} = [];
82
+    $self->{evalstr_chunk_prefix} = []; # stack (array) of source code sections
83
+    $self->{evalstr} = ''; $self->{evalstr_l} = 0;
84
+    $self->{evalstr2} = '';
85
+    $self->begin_evalstr_chunk($pms);
86
 
87
-  $self->push_evalstr_prefix($pms, '
88
-      # start_rules_plugin_code '.$ruletype.' '.$priority.'
89
-      my $scoresptr = $self->{conf}->{scores};
90
-  ');
91
-  if (defined $opts{pre_loop_body}) {
92
-    $opts{pre_loop_body}->($self, $pms, $conf, %nopts);
93
-  }
94
-  $self->add_evalstr($pms,
95
-                     $self->start_rules_plugin_code($ruletype, $priority) );
96
-  while (my($rulename, $test) = each %{$opts{testhash}->{$priority}}) {
97
-    $opts{loop_body}->($self, $pms, $conf, $rulename, $test, %nopts);
98
-  }
99
-  if (defined $opts{post_loop_body}) {
100
-    $opts{post_loop_body}->($self, $pms, $conf, %nopts);
101
-  }
102
+    $self->push_evalstr_prefix($pms, '
103
+        # start_rules_plugin_code '.$ruletype.' '.$priority.'
104
+        my $scoresptr = $self->{conf}->{scores};
105
+    ');
106
+    if (defined $opts{pre_loop_body}) {
107
+      $opts{pre_loop_body}->($self, $pms, $conf, %nopts);
108
+    }
109
+    $self->add_evalstr($pms,
110
+                       $self->start_rules_plugin_code($ruletype, $priority) );
111
+    while (my($rulename, $test) = each %{$opts{testhash}->{$priority}}) {
112
+      $opts{loop_body}->($self, $pms, $conf, $rulename, $test, %nopts);
113
+    }
114
+    if (defined $opts{post_loop_body}) {
115
+      $opts{post_loop_body}->($self, $pms, $conf, %nopts);
116
+    }
117
 
118
-  $self->flush_evalstr($pms, 'run_generic_tests');
119
-  $self->free_ruleset_source($pms, $ruletype, $priority);
120
+    $self->flush_evalstr($pms, 'run_generic_tests');
121
+    $self->free_ruleset_source($pms, $ruletype, $priority);
122
 
123
-  # clear out a previous version of this method
124
-  undef &{$methodname};
125
+    # clear out a previous version of this method
126
+    undef &{$methodname};
127
 
128
-  # generate the loop that goes through each line...
129
-  my $evalstr = <<"EOT";
130
+    # generate the loop that goes through each line...
131
+    my $evalstr = <<"EOT";
132
   {
133
     package $package_name;
134
 
135
@@ -373,41 +360,52 @@
136
     sub $methodname {
137
 EOT
138
 
139
-  for my $chunk_methodname (@{$self->{evalstr_chunk_methodnames}}) {
140
-    $evalstr .= "      $chunk_methodname(\@_);\n";
141
-  }
142
+    for my $chunk_methodname (@{$self->{evalstr_chunk_methodnames}}) {
143
+      $evalstr .= "      $chunk_methodname(\@_);\n";
144
+    }
145
 
146
-  $evalstr .= <<"EOT";
147
+    $evalstr .= <<"EOT";
148
     }
149
 
150
     1;
151
   }
152
 EOT
153
 
154
-  delete $self->{evalstr};   # free up some RAM before we eval()
155
-  delete $self->{evalstr2};
156
-  delete $self->{evalstr_methodname};
157
-  delete $self->{evalstr_chunk_current_methodname};
158
-  delete $self->{evalstr_chunk_methodnames};
159
-  delete $self->{evalstr_chunk_prefix};
160
+    delete $self->{evalstr};   # free up some RAM before we eval()
161
+    delete $self->{evalstr2};
162
+    delete $self->{evalstr_methodname};
163
+    delete $self->{evalstr_chunk_current_methodname};
164
+    delete $self->{evalstr_chunk_methodnames};
165
+    delete $self->{evalstr_chunk_prefix};
166
 
167
-  dbg("rules: run_generic_tests - compiling eval code: %s, priority %s",
168
-      $ruletype, $priority);
169
-# dbg("rules: eval code to compile: $evalstr");
170
-  my $eval_result;
171
-  { my $timer = $self->{main}->time_method('compile_gen');
172
-    $eval_result = eval($evalstr);
173
-  }
174
-  if (!$eval_result) {
175
-    my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
176
-    warn "rules: failed to compile $ruletype tests, skipping:\n".
177
-         "\t($eval_stat)\n";
178
-    $pms->{rule_errors}++;
179
-  }
180
-  else {
181
+    dbg("rules: run_generic_tests - compiling eval code: %s, priority %s",
182
+        $ruletype, $priority);
183
+  # dbg("rules: eval code to compile: $evalstr");
184
+    my $eval_result;
185
+    { my $timer = $self->{main}->time_method('compile_gen');
186
+      $eval_result = eval($evalstr);
187
+    }
188
+    if (!$eval_result) {
189
+      my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
190
+      warn "rules: failed to compile $ruletype tests, skipping:\n".
191
+           "\t($eval_stat)\n";
192
+      $pms->{rule_errors}++;
193
+      return;
194
+    }
195
     dbg("rules: compiled $ruletype tests");
196
-    goto run_compiled_method;
197
   }
198
+
199
+#run_compiled_method:
200
+# dbg("rules: run_generic_tests - calling %s", $methodname);
201
+  my $t = Mail::SpamAssassin::Timeout->new({ deadline => $master_deadline });
202
+  my $err = $t->run(sub {
203
+    no strict "refs";
204
+    $methodname->($pms, @{$opts{args}});
205
+  });
206
+  if ($t->timed_out() && $master_deadline && time > $master_deadline) {
207
+    info("check: exceeded time limit in $methodname, skipping further tests");
208
+    $pms->{deadline_exceeded} = 1;
209
+  }
210
 }
211
 
212
 sub begin_evalstr_chunk {
213
Index: lib/Mail/SpamAssassin/Plugin/BodyEval.pm
214
===================================================================
215
--- lib/Mail/SpamAssassin/Plugin/BodyEval.pm	(revision 943932)
216
+++ lib/Mail/SpamAssassin/Plugin/BodyEval.pm	(revision 943933)
217
@@ -119,7 +119,7 @@
218
         }
219
 
220
 	# If there are no words, mark if there's at least 1 image ...
221
-	if (keys %html == 0 && exists $pms->{html}{inside}{img}) {
222
+	if (!%html && exists $pms->{html}{inside}{img}) {
223
 	  # Use "\n" as the mark since it can't ever occur normally
224
 	  $html{"\n"}=1;
225
 	}
(-)/usr/ports/japanese/p5-Mail-SpamAssassin/files/patch-bug6396 (+13 lines)
Line 0 Link Here
1
Index: lib/Mail/SpamAssassin/Plugin/MIMEEval.pm
2
===================================================================
3
--- lib/Mail/SpamAssassin/Plugin/MIMEEval.pm	(revision 929342)
4
+++ lib/Mail/SpamAssassin/Plugin/MIMEEval.pm	(revision 929343)
5
@@ -498,7 +498,7 @@
6
     # perhaps just limit to test, and image?
7
     next if ($ctype eq 'application/ics');
8
 
9
-    my $cte = lc $p->get_header('content-transfer-encoding') || '';
10
+    my $cte = lc($p->get_header('content-transfer-encoding') || '');
11
     next if ($cte !~ /^base64$/);
12
     foreach my $l ( @{$p->raw()} ) {
13
       my $len = length $l;

Return to bug 155007