ports/143654: MAINTAINER UPDATE mail/p5-Mail-SpamAssassin update to 3.3.0

Michael Scheidell scheidell at secnap.net
Sun Feb 7 22:40:01 UTC 2010


>Number:         143654
>Category:       ports
>Synopsis:       MAINTAINER UPDATE mail/p5-Mail-SpamAssassin update to 3.3.0
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 07 22:40:00 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Michael Scheidell
>Release:        7.1
>Organization:
SECNAP Network Security
>Environment:
na
>Description:
SpamAssassin 3.30 is the first major update to SA in a couple of years.
This update contains several fixes and incorporates several changes.

Clients upgrading to 3.30 should read the README and INSTALL files at
http://spamassassin.org/dist/INSTALL and
http://spamassassin.org/dist/UPGRADE BEFORE enabling this version of SpamAssassin for important information regarding changes in this version.

Note: rule updates are no longer distributed with SA 3.30 source.
if you are running an interactive make reinstall or portupgrade, you will be asked if you wish to run sa-update now. Automated nightly updates need to run sa-update prior to using this version of SpamAssassin.

Other minor rule name changes may affect your own custom meta rules or scores.

For general SA questions, post to the SA users mailing list.

This port has been tested on 7.1 amd64 and i386. Do not report problems with unsupported versions such as 6.4 or before.
RECOMMEND perl 5.10, but requires perl 5.8.8 at minimum.

For FreeBsd specific issues, open a FreeBSD support PR.

This port includes FreeBsd specific pr 143016, and several post 3.30 critical patches that are not FreeBsd Specific.

Also note, DCC has been re-enabled. If you install DCC, see the license for the DCC port. DCC is dual licensed, if you are reselling anti-spam, you should get a DCC commercial license to be able to use the new DCC reputations database and improve the DCC response time by 1000ms per email.
Note: if you are using the DCC commercial version, DO NOT ENABLE the DCC port.

Specific SA post 3.30 patches:
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6310
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6307
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6312
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6313
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6316
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6321
>How-To-Repeat:
na
>Fix:
Apply this patch, then run sa-update (and optionally sa-compile) then restart SpamAssassin.

Patch attached with submission follows:

diff -bBru /var/tmp/SA325/Makefile ../../mail/p5-Mail-SpamAssassin/Makefile
--- /var/tmp/SA325/Makefile	2009-07-22 12:26:48.000000000 -0400
+++ ../../mail/p5-Mail-SpamAssassin/Makefile	2010-02-05 12:35:51.000000000 -0500
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	Mail-SpamAssassin
-PORTVERSION=	3.2.5
-PORTREVISION=	4
+PORTVERSION=	3.3.0
 CATEGORIES=	mail perl5
 MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
 MASTER_SITE_SUBDIR=	spamassassin/source/:apache Mail/:cpan
@@ -22,17 +21,19 @@
 		p5-HTML-Parser>=3.43:${PORTSDIR}/www/p5-HTML-Parser \
 		p5-IO-Compress-Zlib>=2.04:${PORTSDIR}/archivers/p5-IO-Compress-Zlib \
 		p5-Compress-Zlib>=2.04:${PORTSDIR}/archivers/p5-Compress-Zlib \
-		${SITE_PERL}/Mail/Internet.pm:${PORTSDIR}/mail/p5-Mail-Tools \
-		p5-Digest-SHA1>=2.11:${PORTSDIR}/security/p5-Digest-SHA1
+		${SITE_PERL}/Mail/Internet.pm:${PORTSDIR}/mail/p5-Mail-Tools
 
 RUN_DEPENDS=	${BUILD_DEPENDS} \
 		${SITE_PERL}/Bundle/LWP.pm:${PORTSDIR}/www/p5-libwww \
 		p5-Archive-Tar>=1.23:${PORTSDIR}/archivers/p5-Archive-Tar \
-		${SITE_PERL}/mach/Encode/Detect.pm:${PORTSDIR}/converters/p5-Encode-Detect
+		${SITE_PERL}/${PERL_ARCH}/Encode/Detect.pm:${PORTSDIR}/converters/p5-Encode-Detect \
+		${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
+		p5-NetAddr-IP>=4.00.7:${PORTSDIR}/net-mgmt/p5-NetAddr-IP
 
 CONFLICTS=	ja-p5-Mail-SpamAssassin-[0-9]*
 
 PERL_CONFIGURE=	yes
+USE_PERL5_RUN=  5.8.8+
 USE_LDCONFIG=	yes
 CONFIGURE_ARGS=	SYSCONFDIR="${PREFIX}/etc" \
 	       	CONTACT_ADDRESS="${CONTACT_ADDRESS}" \
@@ -44,14 +45,19 @@
 OPTIONS=	AS_ROOT "Run spamd as root (recommended)" on \
 		SPAMC "Build spamd/spamc (not for amavisd)" on \
 		SACOMPILE "sa-compile" off \
-		DKIM "DKIM/DomainKeys Identified Mail" off \
+		DKIM "DKIM/DomainKeys Identified Mail" on \
 		SSL "Build with SSL support for spamd/spamc" on \
 		GNUPG "Install GnuPG (for sa-update)" on \
 		MYSQL "Add MySQL support" off \
 		PGSQL "Add PostreSQL support" off \
 		RAZOR "Add Vipul's Razor support" on \
 		SPF_QUERY "Add SPF query support" off \
-		RELAY_COUNTRY "Relay country support" off
+		RELAY_COUNTRY "Relay country support" off \
+		DCC "Add DCC support (see LICENSE)" off
+
+.if !defined(WITHOUT_SSL)
+USE_OPENSSL=    yes
+.endif
 
 .include <bsd.port.pre.mk>
 
@@ -64,14 +70,12 @@
 .endif
 
 .if defined(WITH_SPF_QUERY)
-RUN_DEPENDS+=	p5-NetAddr-IP>=4.00.7:${PORTSDIR}/net-mgmt/p5-NetAddr-IP
 RUN_DEPENDS+=	${SITE_PERL}/Mail/SPF.pm:${PORTSDIR}/mail/p5-Mail-SPF
 .endif
 
 .if !defined(WITHOUT_SSL)
 .include "${PORTSDIR}/Mk/bsd.openssl.mk"
 RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
-USE_OPENSSL=	yes
 CFLAGS+=	-I${OPENSSLINC}
 LDFLAGS+=	-L${OPENSSLLIB}
 CONFIGURE_ARGS+=	ENABLE_SSL=yes
@@ -95,12 +99,19 @@
 
 .if defined(WITH_RAZOR)
 RUN_DEPENDS+=	razor-agents>=2.84:${PORTSDIR}/mail/razor-agents
+.else
+.if !defined(WITH_DKIM)
+.if   ${PERL_LEVEL} < 501000
+RUN_DEPENDS=+	p5-Digest-SHA1>=2.11:${PORTSDIR}/security/p5-Digest-SHA1
+.endif
+.endif
 .endif
 
 .if defined(WITH_DKIM)
-RUN_DEPENDS+=	p5-Mail-DKIM>=0.34:${PORTSDIR}/mail/p5-Mail-DKIM
+RUN_DEPENDS+=	p5-Mail-DKIM>=0.37:${PORTSDIR}/mail/p5-Mail-DKIM
 RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
 RUN_DEPENDS+=	p5-Crypt-OpenSSL-RSA>=0.24:${PORTSDIR}/security/p5-Crypt-OpenSSL-RSA
+RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/Digest/SHA.pm:${PORTSDIR}/security/p5-Digest-SHA
 .endif
 
 .if defined(WITH_SACOMPILE)
@@ -111,6 +122,14 @@
 RUN_DEPENDS+=	${SITE_PERL}/IP/Country/Fast.pm:${PORTSDIR}/net/p5-IP-Country
 .endif
 
+.if !defined(NO_INET6)
+RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/INET6.pm:${PORTSDIR}/net/p5-IO-INET6
+.endif
+
+.if defined(WITH_DCC)
+RUN_DEPENDS+=	dcc-dccd>=1.3.111:${PORTSDIR}/mail/dcc-dccd
+.endif
+
 MAN3=		Mail::SpamAssassin.3 \
 		Mail::SpamAssassin::AICache.3 \
 		Mail::SpamAssassin::ArchiveIterator.3 \
@@ -118,6 +137,7 @@
 		Mail::SpamAssassin::AutoWhitelist.3 \
 		Mail::SpamAssassin::Bayes.3 \
 		Mail::SpamAssassin::BayesStore.3 \
+		Mail::SpamAssassin::BayesStore::BDB.3 \
 		Mail::SpamAssassin::BayesStore::MySQL.3 \
 		Mail::SpamAssassin::BayesStore::PgSQL.3 \
 		Mail::SpamAssassin::BayesStore::SQL.3 \
@@ -147,10 +167,10 @@
 		Mail::SpamAssassin::Plugin::Check.3 \
 		Mail::SpamAssassin::Plugin::DCC.3 \
 		Mail::SpamAssassin::Plugin::DKIM.3 \
-		Mail::SpamAssassin::Plugin::DomainKeys.3 \
 		Mail::SpamAssassin::Plugin::Hashcash.3 \
 		Mail::SpamAssassin::Plugin::MIMEHeader.3 \
 		Mail::SpamAssassin::Plugin::OneLineBodyRuleType.3 \
+		Mail::SpamAssassin::Plugin::PhishTag.3 \
 		Mail::SpamAssassin::Plugin::Pyzor.3 \
 		Mail::SpamAssassin::Plugin::Razor2.3 \
 		Mail::SpamAssassin::Plugin::RelayCountry.3 \
@@ -205,11 +225,12 @@
 		-e 's#B_CONFDIR)/v310.pre#B_CONFDIR)/v310.pre.sample#g' \
 		-e 's#B_CONFDIR)/v312.pre#B_CONFDIR)/v312.pre.sample#g' \
 		-e 's#B_CONFDIR)/v320.pre#B_CONFDIR)/v320.pre.sample#g' \
+		-e 's#B_CONFDIR)/v330.pre#B_CONFDIR)/v330.pre.sample#g' \
 		-e 's/require DBI/0/' \
 		${WRKSRC}/Makefile.PL
 	@${REINPLACE_CMD} -e '/^CC =/d; \
 		s|@SSLCFLAGS@|& $${CFLAGS}|g' ${WRKSRC}/spamc/Makefile.in
-
+	@${MKDIR}  ${DATADIR}
 
 .if defined(WITH_RAZOR)
 	${REINPLACE_CMD} -e '/Razor2/s/^#loadplugin/loadplugin/' ${WRKSRC}/rules/v312.pre
@@ -217,8 +238,8 @@
 .if defined(WITH_RELAY_COUNTRY)
 	${REINPLACE_CMD} -e '/RelayCountry/s/^# ?loadplugin/loadplugin/' ${WRKSRC}/rules/init.pre
 .endif
-.if defined(WITH_DKIM)
-	${REINPLACE_CMD} -e '/DKIM/s/^#loadplugin/loadplugin/' ${WRKSRC}/rules/v312.pre
+.if !defined(WITH_DKIM)
+	${REINPLACE_CMD} -e '/DKIM/s/^loadplugin/#loadplugin/' ${WRKSRC}/rules/v312.pre
 .endif
 .if !defined(WITH_SPF_QUERY)
 	${REINPLACE_CMD} -e '/SPF/s/^loadplugin/#loadplugin/' ${WRKSRC}/rules/init.pre
@@ -226,6 +247,9 @@
 .if defined(WITH_DCC)
 	${REINPLACE_CMD} -e '/DCC/s/^#loadplugin/loadplugin/' ${WRKSRC}/rules/v310.pre
 .endif
+.if !defined(WITH_AWL)
+	${REINPLACE_CMD} -e '/AWL/s/^loadplugin/#loadplugin/' ${WRKSRC}/rules/v310.pre
+.endif
 .if defined(WITH_SACOMPILE)
 	${REINPLACE_CMD} -e '/Rule2XSBody/s/^# loadplugin/loadplugin/' ${WRKSRC}/rules/v320.pre
 .endif
diff -bBru /var/tmp/SA325/distinfo ../../mail/p5-Mail-SpamAssassin/distinfo
--- /var/tmp/SA325/distinfo	2008-06-14 21:59:20.000000000 -0400
+++ ../../mail/p5-Mail-SpamAssassin/distinfo	2010-02-04 15:33:14.000000000 -0500
@@ -1,3 +1,3 @@
-MD5 (Mail-SpamAssassin-3.2.5.tar.gz) = 7fdc1651d0371c4a7f95ac9ae6f828a6
-SHA256 (Mail-SpamAssassin-3.2.5.tar.gz) = 105e18448d7ee2e576ceaca23b129da5e4a3c7dfccec73b6a3babb75d9c0b4f7
-SIZE (Mail-SpamAssassin-3.2.5.tar.gz) = 1223706
+MD5 (Mail-SpamAssassin-3.3.0.tar.gz) = 38078b07396c0ab92b46386bc70ef086
+SHA256 (Mail-SpamAssassin-3.3.0.tar.gz) = 51676f4c3af787e3b186aeb8c5ca556330f91a6e213c266480fda3518ed53564
+SIZE (Mail-SpamAssassin-3.3.0.tar.gz) = 1322429
diff -bBru /var/tmp/SA325/files/patch-BayesStore-DBM.pm ../../mail/p5-Mail-SpamAssassin/files/patch-BayesStore-DBM.pm
--- /var/tmp/SA325/files/patch-BayesStore-DBM.pm	2010-02-06 18:12:55.000000000 -0500
+++ ../../mail/p5-Mail-SpamAssassin/files/patch-BayesStore-DBM.pm	2010-02-05 10:09:33.000000000 -0500
@@ -0,0 +1,13 @@
+--- lib/Mail/SpamAssassin/BayesStore/DBM.pm	(revision 903517)
++++ lib/Mail/SpamAssassin/BayesStore/DBM.pm	(working copy)
+@@ -1438,6 +1438,9 @@
+     # bayes directory
+     my $main = $self->{bayes}->{main};
+     my $path = $main->sed_path($main->{conf}->{bayes_path});
++
++    # prevent dirname() from tainting the result, it assumes $1 is not tainted
++    local($1,$2,$3);  # Bug 6310
+     my $dir = dirname($path);
+ 
+     # make temporary copy since old dbm and new dbm may have same name
+
diff -bBru /var/tmp/SA325/files/patch-Conf.pm ../../mail/p5-Mail-SpamAssassin/files/patch-Conf.pm
--- /var/tmp/SA325/files/patch-Conf.pm	2010-02-06 18:12:55.000000000 -0500
+++ ../../mail/p5-Mail-SpamAssassin/files/patch-Conf.pm	2010-02-05 09:51:26.000000000 -0500
@@ -0,0 +1,24 @@
+--- lib/Mail/SpamAssassin/Conf.pm	(revision 903394)
++++ lib/Mail/SpamAssassin/Conf.pm	(working copy)
+@@ -2156,8 +2156,8 @@
+ =item header SYMBOLIC_TEST_NAME exists:name_of_header
+ 
+ Define a header existence test.  C<name_of_header> is the name of a
+-header to test for existence.  This is just a very simple version of
+-the above header tests.
++header field to test for existence.  This is just a very simple version
++of the above header tests.
+ 
+ =item header SYMBOLIC_TEST_NAME eval:name_of_eval_method([arguments])
+ 
+@@ -2280,7 +2280,8 @@
+           $self->{parser}->add_test ($name, $fn, $TYPE_HEAD_EVALS);
+         }
+       }
+-      elsif ($value =~ /^(\S+)\s+exists:(.*)$/) {
++      elsif ($value =~ /^(\S+)\s+exists:([!-9;-\176]+)$/) {
++        # RFC 5322 section 3.6.8, ftext printable US-ASCII ch not including ":"
+         $self->{parser}->add_test ($1, "defined($2)", $TYPE_HEAD_TESTS);
+         $self->{descriptions}->{$1} = "Found a $2 header";
+       }
+
diff -bBru /var/tmp/SA325/files/patch-DCC.pm ../../mail/p5-Mail-SpamAssassin/files/patch-DCC.pm
--- /var/tmp/SA325/files/patch-DCC.pm	2010-02-06 18:12:55.000000000 -0500
+++ ../../mail/p5-Mail-SpamAssassin/files/patch-DCC.pm	2010-02-01 08:11:18.000000000 -0500
@@ -0,0 +1,21 @@
+--- lib/Mail/SpamAssassin/Plugin/DCC.pm	(revision 905273)
++++ lib/Mail/SpamAssassin/Plugin/DCC.pm	(working copy)
+@@ -679,7 +679,7 @@
+   my $left;
+   my $right;
+   my $timeout = $conf->{dcc_timeout};
+-  my $opts = $conf->{dcc_options};
++  my $opts = $conf->{dccifd_options};
+   my @opts = !defined $opts ? () : split(' ',$opts);
+ 
+   $permsgstatus->enter_helper_run_mode();
+@@ -906,7 +906,7 @@
+   my $conf = $self->{main}->{conf};
+   my $timeout = $conf->{dcc_timeout};
+   # instead of header use whatever the report option is
+-  my $opts = $conf->{dcc_options};
++  my $opts = $conf->{dccifd_options};
+   my @opts = !defined $opts ? () : split(' ',$opts);
+ 
+   $options->{report}->enter_helper_run_mode();
+
diff -bBru /var/tmp/SA325/files/patch-Message.pm ../../mail/p5-Mail-SpamAssassin/files/patch-Message.pm
--- /var/tmp/SA325/files/patch-Message.pm	2010-02-06 18:12:55.000000000 -0500
+++ ../../mail/p5-Mail-SpamAssassin/files/patch-Message.pm	2010-01-31 14:36:34.000000000 -0500
@@ -0,0 +1,11 @@
+--- lib/Mail/SpamAssassin/Message.pm.orig	2010/01/29 15:48:09	904525
++++ lib/Mail/SpamAssassin/Message.pm	2010/01/29 15:48:29	904526
+@@ -114,6 +114,7 @@
+   $self->{pristine_body} =	'';
+   $self->{mime_boundary_state} = {};
+   $self->{line_ending} =	"\012";
++  $self->{master_deadline} = $opts->{'master_deadline'};
+   $self->{suppl_attrib} = $opts->{'suppl_attrib'};
+ 
+   bless($self,$class);
+
Only in ../../mail/p5-Mail-SpamAssassin/files: patch-Parser.pm
diff -bBru /var/tmp/SA325/files/patch-SpamAssassin.pm ../../mail/p5-Mail-SpamAssassin/files/patch-SpamAssassin.pm
--- /var/tmp/SA325/files/patch-SpamAssassin.pm	2010-02-06 18:12:55.000000000 -0500
+++ ../../mail/p5-Mail-SpamAssassin/files/patch-SpamAssassin.pm	2010-02-01 14:51:03.000000000 -0500
@@ -0,0 +1,51 @@
+--- lib/Mail/SpamAssassin.pm.orig	2010/01/29 15:48:09	904525
++++ lib/Mail/SpamAssassin.pm	2010/01/29 15:48:29	904526
+@@ -75,6 +75,7 @@
+ use Mail::SpamAssassin::Message;
+ use Mail::SpamAssassin::PluginHandler;
+ use Mail::SpamAssassin::DnsResolver;
++use Mail::SpamAssassin::Util qw(untaint_var);
+ use Mail::SpamAssassin::Util::ScopedTimer;
+ 
+ use Errno qw(ENOENT EACCES);
+@@ -490,20 +490,21 @@
+   $self->init(1);
+   my $timer = $self->time_method("parse");
+ 
+-  my $msg = Mail::SpamAssassin::Message->new({
+-    message=>$message, parsenow=>$parsenow,
+-    normalize=>$self->{conf}->{normalize_charset},
+-    suppl_attrib=>$suppl_attrib });
+-
++  my $master_deadline;
+   if (ref $suppl_attrib && exists $suppl_attrib->{master_deadline}) {
+-    $msg->{master_deadline} = $suppl_attrib->{master_deadline};  # may be undef
++    $master_deadline = $suppl_attrib->{master_deadline};  # may be undef
+   } elsif ($self->{conf}->{time_limit}) {  # defined and nonzero
+-    $msg->{master_deadline} = $start_time + $self->{conf}->{time_limit};
++    $master_deadline = $start_time + $self->{conf}->{time_limit};
+   }
+-  if (defined $msg->{master_deadline}) {
+-    dbg("config: time limit %.1f s", $msg->{master_deadline} - $start_time);
++  if (defined $master_deadline) {
++    dbg("config: time limit %.1f s", $master_deadline - $start_time);
+   }
+ 
++  my $msg = Mail::SpamAssassin::Message->new({
++    message=>$message, parsenow=>$parsenow,
++    normalize=>$self->{conf}->{normalize_charset},
++    master_deadline=>$master_deadline, suppl_attrib=>$suppl_attrib });
++
+   # bug 5069: The goal here is to get rendering plugins to do things
+   # like OCR, convert doc and pdf to text, etc, though it could be anything
+
+@@ -1935,7 +1936,7 @@
+       close IN  or die "error closing $defprefs: $!";
+ 
+       if (($< == 0) && ($> == 0) && defined($user)) { # chown it
+-        my ($uid,$gid) = (getpwnam($user))[2,3];
++        my ($uid,$gid) = (getpwnam(untaint_var($user)))[2,3];
+         unless (chown($uid, $gid, $fname)) {
+           warn "config: couldn't chown $fname to $uid:$gid for $user: $!\n";
+         }
+
diff -bBru /var/tmp/SA325/files/patch-bayes.pm ../../mail/p5-Mail-SpamAssassin/files/patch-bayes.pm
--- /var/tmp/SA325/files/patch-bayes.pm	2009-03-19 13:11:28.000000000 -0400
+++ ../../mail/p5-Mail-SpamAssassin/files/patch-bayes.pm	2010-02-05 12:43:31.000000000 -0500
@@ -1,10 +1,12 @@
---- Bayes.pm.orig      2008-06-10 05:20:22.000000000 -0400
-+++ lib/Mail/SpamAssassin/Bayes.pm     2008-08-22 03:23:38.000000000 -0400
-@@ -145,6 +145,7 @@
- # hapaxen they generate.
- $MARK_PRESENCE_ONLY_HDRS = qr{(?: X-Face
-   |X-(?:Gnu-?PG|PGP|GPG)(?:-Key)?-Fingerprint
-+  |D(?:KIM|omainKey)-Signature
- )}ix;
+--- lib/Mail/SpamAssassin/Plugin/Bayes.pm	2010/01/26 12:13:41	903191
++++ lib/Mail/SpamAssassin/Plugin/Bayes.pm	2010/02/03 16:44:07	906120
+@@ -832,7 +832,7 @@
+             });
+ 
+   $permsgstatus->set_tag ('TOKENSUMMARY', sub {
+-              if( defined $self->{tag_data}{BAYESTC} )
++              if ( defined $permsgstatus->{tag_data}{BAYESTC} )
+                 {
+                   my $tcount_neutral = $permsgstatus->{tag_data}{BAYESTCLEARNED}
+                                     - $permsgstatus->{tag_data}{BAYESTCSPAMMY}
  
- # tweaks tested as of Nov 18 2002 by jm: see SpamAssassin-devel list archives
diff -bBru /var/tmp/SA325/files/patch-sa-compile.raw ../../mail/p5-Mail-SpamAssassin/files/patch-sa-compile.raw
--- /var/tmp/SA325/files/patch-sa-compile.raw	2008-06-14 21:59:21.000000000 -0400
+++ ../../mail/p5-Mail-SpamAssassin/files/patch-sa-compile.raw	2010-01-31 14:37:48.000000000 -0500
@@ -1,29 +0,0 @@
---- sa-compile.raw.orig        Tue Jun 10 05:21:07 2008
-+++ sa-compile.raw     Thu Jun 12 17:28:56 2008
-@@ -682,9 +682,9 @@
-   -p prefs, --prefspath=file, --prefs-file=file
-                                 Set user preferences file
-   --siteconfigpath=path         Path for site configs
--                                (default: /etc/mail/spamassassin)
-+                               (default: @@LOCAL_RULES_DIR@@)
-   --updatedir=path              Directory to place updates
--                      (default: /var/lib/spamassassin/compiled/<perlversion>/<version>)
-+                      (default: @@LOCAL_STATE_DIR@@/compiled/<perlversion>/<version>)
-   --cf='config line'            Additional line of configuration
-   -D, --debug [area=n,...]	Print debugging messages
-   -V, --version			Print version
-@ -735,12 +735,12 @@
- =item B<-C> I<path>, B<--configpath>=I<path>, B<--config-file>=I<path>
- 
- Use the specified path for locating the distributed configuration files.
--Ignore the default directories (usually C</usr/share/spamassassin> or similar).
-+Ignore the default directories (usually C<@@DEF_RULES_DIR@@> or similar).
- 
- =item B<--siteconfigpath>=I<path>
- 
- Use the specified path for locating site-specific configuration files.  Ignore
--the default directories (usually C</etc/mail/spamassassin> or similar).
-+the default directories (usually C<@@LOCAL_RULES_DIR@@> or similar).
- 
- =item B<--updatedir>
- 
diff -bBru /var/tmp/SA325/files/patch-spamassassin.raw ../../mail/p5-Mail-SpamAssassin/files/patch-spamassassin.raw
--- /var/tmp/SA325/files/patch-spamassassin.raw	2009-05-30 19:27:22.000000000 -0400
+++ ../../mail/p5-Mail-SpamAssassin/files/patch-spamassassin.raw	2010-01-31 14:38:28.000000000 -0500
@@ -1,12 +0,0 @@
---- spamassassin.raw.orig       2009-05-14 20:48:01.000000000 -0500
-+++ spamassassin.raw    2009-05-14 20:48:19.000000000 -0500
-@@ -530,7 +530,7 @@
-     $mail->finish();      # bug 5626: remove temp files etc.
-     $mail = undef;
-   }
--  exit 0;
-+  exit 15;
- }
-
- # ---------------------------------------------------------------------------
-
diff -bBru /var/tmp/SA325/files/patch-spamd_spamd.raw ../../mail/p5-Mail-SpamAssassin/files/patch-spamd_spamd.raw
--- /var/tmp/SA325/files/patch-spamd_spamd.raw	2008-04-28 09:30:57.000000000 -0400
+++ ../../mail/p5-Mail-SpamAssassin/files/patch-spamd_spamd.raw	2010-02-01 14:51:36.000000000 -0500
@@ -1,11 +1,52 @@
 --- spamd/spamd.raw.orig	2008-04-24 09:50:46.000000000 +0200
 +++ spamd/spamd.raw	2008-04-24 09:52:55.000000000 +0200
-@@ -2075,7 +2075,7 @@
-   if ( $opt{'user-config'} ) {
-     my $prefsfrom = $username;  # the one passed, NOT $opt{username}
- 
--    if ($prefsfrom eq $suidto) {
-+    if ($prefsfrom eq $suidto || $opt{'vpopmail'}) {
-       $userdir = $suiddir;      # reuse the already-looked-up info
-     } else {
-       $userdir = (getpwnam($prefsfrom))[7];
+@@ -1381,8 +1381,9 @@
+   
+   # Now parse *only* the message headers; the MIME tree won't be generated 
+   # yet, it will be done on demand later on.
+-  my $mail = $spamtest->parse(\@msglines, 0, !$timeout_child ? () :
+-                         { master_deadline => $start_time + $timeout_child } );
++  my $mail = $spamtest->parse(\@msglines, 0,
++                       !$timeout_child || !$start_time ? ()
++                       : { master_deadline => $start_time + $timeout_child } );
+ 
+   return ($mail, $actual_length);
+ }
+@@ -1705,8 +1706,9 @@
+   my $resp = "EX_OK";
+ 
+   # generate mail object from input
+-  my ($mail, $actual_length) = parse_body($client, $expected_length,
+-                $compress_zlib);
++  my($mail, $actual_length) =
++    parse_body($client, $expected_length, $compress_zlib, $start_time);
++
+   return 0 unless defined($mail);       # error
+ 
+   if ($compress_zlib) {
+@@ -2276,8 +2276,14 @@
+ 
+ sub handle_user_setuid_with_sql {
+   my $username = shift;
++
++  # Bug 6313: interestingly, if $username is not tainted than $pwd, $gcos and
++  # $etc end up tainted but other fields not;  if $username _is_ tainted,
++  # getpwnam does not complain, but all returned fields are tainted (which
++  # makes sense, but is worth remembering)
++  #
+   my ($name, $pwd, $uid, $gid, $quota, $comment, $gcos, $dir, $etc) =
+-      getpwnam($username);
++      getpwnam(untaint_var($username));
+ 
+   if (!$spamtest->{'paranoid'} && !defined($uid)) {
+     # if we are given a username, but can't look it up, maybe name
+@@ -2300,7 +2306,7 @@
+   }
+ 
+   my $spam_conf_dir = $dir . '/.spamassassin'; # needed for Bayes, etc.
+-  if (! -d $spam_conf_dir) {
++  if ($opt{'user-config'} && ! -d $spam_conf_dir) {
+     if (mkdir $spam_conf_dir, 0700) {
+       info("spamd: created $spam_conf_dir for $username");
+     }
+
Only in ../../mail/p5-Mail-SpamAssassin/: patch-BayesStore-DBM.pm
Only in ../../mail/p5-Mail-SpamAssassin/: patch-Conf.pm
Only in ../../mail/p5-Mail-SpamAssassin/: patch-DCC.pm
Only in ../../mail/p5-Mail-SpamAssassin/: patch-Message.pm
Only in ../../mail/p5-Mail-SpamAssassin/: patch-Parser.pm
Only in ../../mail/p5-Mail-SpamAssassin/: patch-SpamAssassin.pm
Only in ../../mail/p5-Mail-SpamAssassin/: patch-bayes.pm
Only in ../../mail/p5-Mail-SpamAssassin/: patch-sa-compile.raw
Only in ../../mail/p5-Mail-SpamAssassin/: patch-sa-learn.raw
Only in ../../mail/p5-Mail-SpamAssassin/: patch-spamassassin.raw
Only in ../../mail/p5-Mail-SpamAssassin/: patch-spamd_spamd.raw
diff -bBru /var/tmp/SA325/pkg-install ../../mail/p5-Mail-SpamAssassin/pkg-install
--- /var/tmp/SA325/pkg-install	2009-05-21 10:34:39.000000000 -0400
+++ ../../mail/p5-Mail-SpamAssassin/pkg-install	2010-02-04 15:27:43.000000000 -0500
@@ -1,6 +1,7 @@
 #!/bin/sh
 PKG_PREFIX=${PKG_PREFIX:-/usr/local}
 
+if [ "$2" = "POST-INSTALL" ];then
 ask() {
         local question default answer
 
@@ -27,20 +28,14 @@
         done
 }
 
-if [ "$2" = "POST-INSTALL" ];then
 
    if yesno "Do you wish to run sa-update to fetch new rules" "N";then
-       ${PKG_PREFIX}/bin/sa-update
-       if [ $? -eq 4 ];then
-          # rc=4 means host not found, might be old mirrors.
-          rm -rf /var/db/spamassassin/3*/updates_spamassassin_org/MIRRORED.BY
-          ${PKG_PREFIX}/bin/sa-update
-       fi
+       ${PKG_PREFIX}/bin/sa-update || true
    fi
    grep '^load.*Rule2XSBody' ${PKG_PREFIX}/etc/mail/spamassassin/v320.pre > /dev/null
    if [ $? -eq 0 ];then
      if yesno "Do you wish to compile rules with re2c (will take a long time)" "N";then
-       ${PKG_PREFIX}/bin/sa-compile
+       ${PKG_PREFIX}/bin/sa-compile || true
      fi
    fi
    exit 0
diff -bBru /var/tmp/SA325/pkg-message ../../mail/p5-Mail-SpamAssassin/pkg-message
--- /var/tmp/SA325/pkg-message	2008-06-14 21:59:20.000000000 -0400
+++ ../../mail/p5-Mail-SpamAssassin/pkg-message	2010-01-31 16:34:05.000000000 -0500
@@ -21,10 +21,10 @@
 *************************************************************************
 You may wish to run sa-update now to obtain the latest rules.
 
-NOTE:  FREEBSD users: If you are updating to 3.20 you will find
-that sa-update now places state files in /var/db/spamassassin
-and not the default /var/lib/spamassassin.  This is to be consistant
-with Freebsd file directory conventions
+NOTE:  FREEBSD users: If you are updating from a version prior to 3.20.
+sa-update now places state files in /var/db/spamassassin and not 
+/var/lib/spamassassin.  This is to be consistant with Freebsd file
+directory conventions.
 
 If you run sa-compile, you will notice that files are in 
 /var/db/spamassassin/compiled/<perlversion>/<version> instead of
diff -bBru /var/tmp/SA325/pkg-plist ../../mail/p5-Mail-SpamAssassin/pkg-plist
--- /var/tmp/SA325/pkg-plist	2008-06-14 21:59:20.000000000 -0400
+++ ../../mail/p5-Mail-SpamAssassin/pkg-plist	2010-01-31 16:35:15.000000000 -0500
@@ -20,6 +20,9 @@
 @unexec if cmp -s %B/v320.pre.sample %B/v320.pre; then rm -f %B/v320.pre; fi
 etc/mail/spamassassin/v320.pre.sample
 @exec [ -f %B/v320.pre ] || cp %B/%f %B/v320.pre
+ at unexec if cmp -s %B/v330.pre.sample %B/v330.pre; then rm -f %B/v330.pre;fi
+etc/mail/spamassassin/v330.pre.sample
+ at exec [ -f %B/v330.pre ] || cp %B/%f %B/v330.pre
 include/libspamc.h
 lib/libspamc.so
 lib/libspamc.so.0
@@ -34,6 +37,7 @@
 %%SITE_PERL%%/Mail/SpamAssassin/Bayes/CombineChi.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Bayes/CombineNaiveBayes.pm
 %%SITE_PERL%%/Mail/SpamAssassin/BayesStore.pm
+%%SITE_PERL%%/Mail/SpamAssassin/BayesStore/BDB.pm
 %%SITE_PERL%%/Mail/SpamAssassin/BayesStore/DBM.pm
 %%SITE_PERL%%/Mail/SpamAssassin/BayesStore/MySQL.pm
 %%SITE_PERL%%/Mail/SpamAssassin/BayesStore/PgSQL.pm
@@ -80,7 +84,7 @@
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/DCC.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/DKIM.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/DNSEval.pm
-%%SITE_PERL%%/Mail/SpamAssassin/Plugin/DomainKeys.pm
+%%SITE_PERL%%/Mail/SpamAssassin/Plugin/FreeMail.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/HTMLEval.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/HTTPSMismatch.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/Hashcash.pm
@@ -89,11 +93,13 @@
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/MIMEEval.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/MIMEHeader.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/OneLineBodyRuleType.pm
+%%SITE_PERL%%/Mail/SpamAssassin/Plugin/PhishTag.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/Pyzor.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/Razor2.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/RelayCountry.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/RelayEval.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/ReplaceTags.pm
+%%SITE_PERL%%/Mail/SpamAssassin/Plugin/Reuse.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/Rule2XSBody.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/SPF.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Plugin/Shortcircuit.pm
@@ -116,57 +122,10 @@
 %%SITE_PERL%%/Mail/SpamAssassin/Util/DependencyInfo.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Util/Progress.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Util/RegistrarBoundaries.pm
+%%SITE_PERL%%/Mail/SpamAssassin/Util/ScopedTimer.pm
 %%SITE_PERL%%/Mail/SpamAssassin/Util/TieOneStringHash.pm
 %%SITE_PERL%%/%%PERL_ARCH%%/auto/Mail/SpamAssassin/.packlist
 %%SITE_PERL%%/spamassassin-run.pod
-%%DATADIR%%/10_default_prefs.cf
-%%DATADIR%%/20_advance_fee.cf
-%%DATADIR%%/20_body_tests.cf
-%%DATADIR%%/20_compensate.cf
-%%DATADIR%%/20_dnsbl_tests.cf
-%%DATADIR%%/20_drugs.cf
-%%DATADIR%%/20_dynrdns.cf
-%%DATADIR%%/20_fake_helo_tests.cf
-%%DATADIR%%/20_head_tests.cf
-%%DATADIR%%/20_html_tests.cf
-%%DATADIR%%/20_imageinfo.cf
-%%DATADIR%%/20_meta_tests.cf
-%%DATADIR%%/20_net_tests.cf
-%%DATADIR%%/20_phrases.cf
-%%DATADIR%%/20_porn.cf
-%%DATADIR%%/20_ratware.cf
-%%DATADIR%%/20_uri_tests.cf
-%%DATADIR%%/20_vbounce.cf
-%%DATADIR%%/23_bayes.cf
-%%DATADIR%%/25_accessdb.cf
-%%DATADIR%%/25_antivirus.cf
-%%DATADIR%%/25_asn.cf
-%%DATADIR%%/25_dcc.cf
-%%DATADIR%%/25_dkim.cf
-%%DATADIR%%/25_domainkeys.cf
-%%DATADIR%%/25_hashcash.cf
-%%DATADIR%%/25_pyzor.cf
-%%DATADIR%%/25_razor2.cf
-%%DATADIR%%/25_replace.cf
-%%DATADIR%%/25_spf.cf
-%%DATADIR%%/25_textcat.cf
-%%DATADIR%%/25_uribl.cf
-%%DATADIR%%/30_text_de.cf
-%%DATADIR%%/30_text_fr.cf
-%%DATADIR%%/30_text_it.cf
-%%DATADIR%%/30_text_nl.cf
-%%DATADIR%%/30_text_pl.cf
-%%DATADIR%%/30_text_pt_br.cf
-%%DATADIR%%/50_scores.cf
-%%DATADIR%%/60_awl.cf
-%%DATADIR%%/60_shortcircuit.cf
-%%DATADIR%%/60_whitelist.cf
-%%DATADIR%%/60_whitelist_dk.cf
-%%DATADIR%%/60_whitelist_dkim.cf
-%%DATADIR%%/60_whitelist_spf.cf
-%%DATADIR%%/60_whitelist_subject.cf
-%%DATADIR%%/72_active.cf
-%%DATADIR%%/72_removed.cf
 %%DATADIR%%/languages
 %%DATADIR%%/sa-update-pubkey.txt
 %%DATADIR%%/user_prefs.template
Only in ../../mail/p5-Mail-SpamAssassin/: sa-spamd.sh.in


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list