[Midnightbsd-cvs] mports [23556] trunk/mail/spamassassin: update patchset

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed May 30 10:05:55 EDT 2018


Revision: 23556
          http://svnweb.midnightbsd.org/mports/?rev=23556
Author:   laffer1
Date:     2018-05-30 10:05:54 -0400 (Wed, 30 May 2018)
Log Message:
-----------
update patchset

Modified Paths:
--------------
    trunk/mail/spamassassin/Makefile
    trunk/mail/spamassassin/files/pkg-message.in
    trunk/mail/spamassassin/files/sa-spamd.in
    trunk/mail/spamassassin/pkg-plist

Added Paths:
-----------
    trunk/mail/spamassassin/files/patch-DnsResolver.pm
    trunk/mail/spamassassin/files/patch-bug7199
    trunk/mail/spamassassin/files/patch-bug7208
    trunk/mail/spamassassin/files/patch-bug7231
    trunk/mail/spamassassin/files/patch-bug7265
    trunk/mail/spamassassin/files/patch-bug7404

Modified: trunk/mail/spamassassin/Makefile
===================================================================
--- trunk/mail/spamassassin/Makefile	2018-05-28 23:13:54 UTC (rev 23555)
+++ trunk/mail/spamassassin/Makefile	2018-05-30 14:05:54 UTC (rev 23556)
@@ -2,7 +2,7 @@
 
 PORTNAME=	spamassassin
 PORTVERSION=	3.4.1
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES?=	mail perl5
 MASTER_SITES=	APACHE/spamassassin/source CPAN/Mail
 DISTNAME=	Mail-SpamAssassin-${PORTVERSION}
@@ -12,14 +12,16 @@
 
 LICENSE=	apache2
 
-BUILD_DEPENDS=	p5-Encode-Detect>=0:${PORTSDIR}/converters/p5-Encode-Detect \
-		p5-HTML-Parser>=3.46:${PORTSDIR}/www/p5-HTML-Parser \
-		p5-HTTP-Date>=0:${PORTSDIR}/www/p5-HTTP-Date \
-		p5-IO-Socket-IP>=0:${PORTSDIR}/net/p5-IO-Socket-IP \
-		p5-Net-DNS>=0.63:${PORTSDIR}/dns/p5-Net-DNS \
-		p5-NetAddr-IP>=4.010:${PORTSDIR}/net-mgmt/p5-NetAddr-IP
+BUILD_DEPENDS=	p5-Encode-Detect>=0:converters/p5-Encode-Detect \
+		p5-HTML-Parser>=3.46:www/p5-HTML-Parser \
+		p5-HTTP-Date>=0:www/p5-HTTP-Date \
+		p5-Net-DNS>=0.63:dns/p5-Net-DNS \
+		p5-NetAddr-IP>=4.010:net-mgmt/p5-NetAddr-IP
 RUN_DEPENDS:=	${BUILD_DEPENDS} \
-		re2c:${PORTSDIR}/devel/re2c
+		p5-Net-IDN-Encode>=0:textproc/p5-Net-IDN-Encode \
+		p5-Net-LibIDN>=0:dns/p5-Net-LibIDN \
+		p5-URI>=0:net/p5-URI \
+		re2c>=.12.0:devel/re2c
 
 .for dep in DCC DKIM MYSQL PGSQL PYZOR RAZOR RELAY_COUNTRY SPF_QUERY SSL
 TEST_DEPENDS+=	${${dep}_RUN_DEPENDS}
@@ -27,8 +29,8 @@
 
 CPE_VENDOR=	apache
 
-USES=		cpe
-USE_PERL5=	yes
+USES=		cpe perl5
+USE_PERL5=	configure
 PERL_CONFIGURE=	yes
 USE_LDCONFIG=	yes
 
@@ -45,21 +47,19 @@
 		LOCALSTATEDIR="${DBDIR}/spamassassin" \
 		BUILD_SPAMC=yes
 
-OPTIONS_DEFINE=		AS_ROOT SSL UPDATE_AND_COMPILE
+OPTIONS_DEFINE=		AS_ROOT DOCS SSL
 OPTIONS_GROUP=		DATABASE GPG PLUGINS
 OPTIONS_GROUP_DATABASE=	MYSQL PGSQL
 OPTIONS_GROUP_PLUGINS=	DCC DKIM PYZOR RAZOR RELAY_COUNTRY SPF_QUERY
 OPTIONS_SINGLE=		GPG
 OPTIONS_SINGLE_GPG=	GNUPG_NONE GNUPG GNUPG2
-OPTIONS_DEFAULT=	AS_ROOT GNUPG SSL UPDATE_AND_COMPILE
+OPTIONS_DEFAULT=	AS_ROOT DKIM GNUPG SSL SPF_QUERY
 
 AS_ROOT_DESC=		Run spamd as root (recommended)
-SSL_DESC=		Build spamd/spamc with SSL support
-UPDATE_AND_COMPILE_DESC=Download and compile rulesets (recommended)
 
 DATABASE_DESC=		Optional user-config/bayes database backends
 
-GPG_DESC=		GnuPG (for sa-update, optional)
+GPG_DESC=		GnuPG (for sa-update)
 GNUPG_NONE_DESC=	Do not use GnuPG
 GNUPG_DESC=		GnuPG 1 (security/gnupg1)
 GNUPG2_DESC=		GnuPG 2 (security/gnupg)
@@ -74,24 +74,27 @@
 
 SUB_FILES=	pkg-message
 SUB_LIST+=	SPAMD_OWN="${USERS}:${GROUPS}"
-PLIST_SUB+=	USER=${USERS} GROUP=${GROUPS} PERL5_MAN1=man/man1
+PLIST_SUB+=	USER=${USERS} GROUP=${GROUPS}
 OPTIONS_SUB=	yes
 
-DCC_RUN_DEPENDS=	dcc-dccd>=1.3.111:${PORTSDIR}/mail/dcc-dccd
-DKIM_RUN_DEPENDS=	p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL \
-			p5-Mail-DKIM>=0.37:${PORTSDIR}/mail/p5-Mail-DKIM \
-			p5-Crypt-OpenSSL-RSA>=0.26_1:${PORTSDIR}/security/p5-Crypt-OpenSSL-RSA
-GNUPG_RUN_DEPENDS=	gnupg1>=1.4.7:${PORTSDIR}/security/gnupg1
-GNUPG2_RUN_DEPENDS=	gpg2:${PORTSDIR}/security/gnupg
-MYSQL_RUN_DEPENDS=	p5-DBD-mysql>=0:${PORTSDIR}/databases/p5-DBD-mysql
-PGSQL_RUN_DEPENDS=	p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg
-PYZOR_RUN_DEPENDS=	pyzor:${PORTSDIR}/mail/pyzor
-RAZOR_RUN_DEPENDS=	razor-agents>=2.84:${PORTSDIR}/mail/razor-agents
-RELAY_COUNTRY_RUN_DEPENDS=	p5-Geo-IP>=0:${PORTSDIR}/net/p5-Geo-IP
-SPF_QUERY_RUN_DEPENDS=	p5-Mail-SPF>=0:${PORTSDIR}/mail/p5-Mail-SPF
+AS_ROOT_SUB_LIST=	RUN_AS_USER="-u ${USERS} -H /var/spool/spamd"
+AS_ROOT_SUB_LIST_OFF=	RUN_AS_USER=
+DCC_RUN_DEPENDS=	dcc-dccd>=1.3.111:mail/dcc-dccd
+DKIM_RUN_DEPENDS=	p5-IO-Socket-SSL>=0:security/p5-IO-Socket-SSL \
+			p5-Mail-DKIM>=0.37:mail/p5-Mail-DKIM \
+			p5-Crypt-OpenSSL-RSA>=0.26_1:security/p5-Crypt-OpenSSL-RSA
+GNUPG_RUN_DEPENDS=	gnupg1>=1.4.7:security/gnupg1
+GNUPG2_RUN_DEPENDS=	gpg2:security/gnupg
+MYSQL_RUN_DEPENDS=	p5-DBD-mysql>=0:databases/p5-DBD-mysql
+PGSQL_RUN_DEPENDS=	p5-DBD-Pg>=0:databases/p5-DBD-Pg
+PYZOR_RUN_DEPENDS=	pyzor:mail/pyzor
+RAZOR_RUN_DEPENDS=	razor-agents>=2.84:mail/razor-agents
+RELAY_COUNTRY_RUN_DEPENDS=	p5-Geo-IP>=0:net/p5-Geo-IP \
+			p5-IP-Country>=0:net/p5-IP-Country
+SPF_QUERY_RUN_DEPENDS=	p5-Mail-SPF>=0:mail/p5-Mail-SPF
 
-SSL_USE=		OPENSSL=yes
-SSL_RUN_DEPENDS=	p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL
+SSL_USES=		ssl
+SSL_RUN_DEPENDS=	p5-IO-Socket-SSL>=0:security/p5-IO-Socket-SSL
 SSL_CONFIGURE_ON=	ENABLE_SSL=yes
 SSL_CONFIGURE_OFF=	ENABLE_SSL=no
 
@@ -102,7 +105,6 @@
 RAZOR_INITVAR=		Razor2
 RELAY_COUNTRY_INITVAR=	RelayCountry
 SPF_QUERY_INITVAR=	SPF
-UPDATE_AND_COMPILE_INITVAR=	Rule2XSBody
 
 DOCS=		CREDITS Changes INSTALL NOTICE PACKAGING README TRADEMARK UPGRADE USAGE procmailrc.example
 DOCSSQL=	README README.awl README.bayes awl_mysql.sql awl_pg.sql bayes_mysql.sql bayes_pg.sql userpref_mysql.sql userpref_pg.sql
@@ -127,18 +129,6 @@
 SUB_LIST+=	SQL_FLAG=""
 .endif
 
-.if empty(PORT_OPTIONS:MAS_ROOT)
-SUB_LIST+=	RUN_AS_USER="-u ${USERS} -H /var/spool/spamd"
-.else
-SUB_LIST+=	RUN_AS_USER=""
-.endif
-
-.if ${PORT_OPTIONS:MUPDATE_AND_COMPILE} && empty(PACKAGE_BUILDING) && empty(BATCH)
-PLIST_SUB+=	UPDATE_ON_INSTALL="yes"
-.else
-PLIST_SUB+=	UPDATE_ON_INSTALL="no"
-.endif
-
 post-patch::
 	${REINPLACE_CMD} -e 's,B_CONFDIR)/local.cf,B_CONFDIR)/local.cf.sample,g' \
 		-e 's,B_CONFDIR)/init.pre,B_CONFDIR)/init.pre.sample,g' \
@@ -153,7 +143,7 @@
 	${REINPLACE_CMD} -e '/^CC =/d; \
 		s|@SSLCFLAGS@|& $${CFLAGS}|g' ${WRKSRC}/spamc/Makefile.in
 
-.for var in ${OPTIONS_GROUP_PLUGINS} UPDATE_AND_COMPILE
+.for var in ${OPTIONS_GROUP_PLUGINS}
 .  if ${PORT_OPTIONS:M${var}}
 	${REINPLACE_CMD} -e '/${${var}_INITVAR}/s/^\#.*loadplugin/loadplugin/' ${WRKSRC}/rules/*.pre
 .  else

Added: trunk/mail/spamassassin/files/patch-DnsResolver.pm
===================================================================
--- trunk/mail/spamassassin/files/patch-DnsResolver.pm	                        (rev 0)
+++ trunk/mail/spamassassin/files/patch-DnsResolver.pm	2018-05-30 14:05:54 UTC (rev 23556)
@@ -0,0 +1,12 @@
+--- lib/Mail/SpamAssassin/DnsResolver.pm	2015/07/20 18:23:18	1691991
++++ lib/Mail/SpamAssassin/DnsResolver.pm	2015/07/20 18:24:48	1691992
+@@ -592,6 +592,9 @@
+   };
+ 
+   if ($packet) {
++    # RD flag needs to be set explicitly since Net::DNS 1.01, Bug 7223	
++    $packet->header->rd(1);
++
+   # my $udp_payload_size = $self->{res}->udppacketsize;
+     my $udp_payload_size = $self->{conf}->{dns_options}->{edns};
+     if ($udp_payload_size && $udp_payload_size > 512) {


Property changes on: trunk/mail/spamassassin/files/patch-DnsResolver.pm
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/spamassassin/files/patch-bug7199
===================================================================
--- trunk/mail/spamassassin/files/patch-bug7199	                        (rev 0)
+++ trunk/mail/spamassassin/files/patch-bug7199	2018-05-30 14:05:54 UTC (rev 23556)
@@ -0,0 +1,258 @@
+--- spamc/libspamc.c.orig
++++ spamc/libspamc.c
+@@ -1187,7 +1187,7 @@ int message_filter(struct transport *tp,
+     unsigned int throwaway;
+     SSL_CTX *ctx = NULL;
+     SSL *ssl = NULL;
+-    SSL_METHOD *meth;
++    const SSL_METHOD *meth;
+     char zlib_on = 0;
+     unsigned char *zlib_buf = NULL;
+     int zlib_bufsiz = 0;
+@@ -1213,11 +1213,7 @@ int message_filter(struct transport *tp,
+     if (flags & SPAMC_USE_SSL) {
+ #ifdef SPAMC_SSL
+ 	SSLeay_add_ssl_algorithms();
+-	if (flags & SPAMC_TLSV1) {
+-	    meth = TLSv1_client_method();
+-	} else {
+-	    meth = SSLv3_client_method(); /* default */
+-	}
++	meth = SSLv23_client_method();
+ 	SSL_load_error_strings();
+ 	ctx = SSL_CTX_new(meth);
+ #else
+@@ -1596,7 +1592,7 @@ int message_tell(struct transport *tp, c
+     int failureval;
+     SSL_CTX *ctx = NULL;
+     SSL *ssl = NULL;
+-    SSL_METHOD *meth;
++    const SSL_METHOD *meth;
+ 
+     assert(tp != NULL);
+     assert(m != NULL);
+@@ -1604,7 +1600,7 @@ int message_tell(struct transport *tp, c
+     if (flags & SPAMC_USE_SSL) {
+ #ifdef SPAMC_SSL
+ 	SSLeay_add_ssl_algorithms();
+-	meth = SSLv3_client_method();
++	meth = SSLv23_client_method();
+ 	SSL_load_error_strings();
+ 	ctx = SSL_CTX_new(meth);
+ #else
+--- spamc/spamc.c.orig
++++ spamc/spamc.c
+@@ -368,16 +368,11 @@ read_args(int argc, char **argv,
+             case 'S':
+             {
+                 flags |= SPAMC_USE_SSL;
+-		if (!spamc_optarg || (strcmp(spamc_optarg,"sslv3") == 0)) {
+-		    flags |= SPAMC_SSLV3;
+-		}
+-		else if (strcmp(spamc_optarg,"tlsv1") == 0) {
+-		    flags |= SPAMC_TLSV1;
+-		}
+-		else {
+-		    libspamc_log(flags, LOG_ERR, "Please specify a legal ssl version (%s)", spamc_optarg);
+-		    ret = EX_USAGE;
+-		}
++                if(spamc_optarg) {
++                    libspamc_log(flags, LOG_ERR,
++                        "Explicit specification of an SSL/TLS version no longer supported.");
++                    ret = EX_USAGE;
++                }
+                 break;
+             }
+ #endif
+--- spamd/spamd.raw.orig
++++ spamd/spamd.raw
+@@ -409,7 +409,6 @@ GetOptions(
+   'sql-config!'              => \$opt{'sql-config'},
+   'ssl'                      => \$opt{'ssl'},
+   'ssl-port=s'               => \$opt{'ssl-port'},
+-  'ssl-version=s'            => \$opt{'ssl-version'},
+   'syslog-socket=s'          => \$opt{'syslog-socket'},
+   'syslog|s=s'               => \$opt{'syslog'},
+   'log-timestamp-fmt:s'      => \$opt{'log-timestamp-fmt'},
+@@ -744,11 +743,6 @@ if ( defined $ENV{'HOME'} ) {
+ 
+ # Do whitelist later in tmp dir. Side effect: this will be done as -u user.
+ 
+-my $sslversion = $opt{'ssl-version'} || 'sslv3';
+-if ($sslversion !~ /^(?:sslv3|tlsv1)$/) {
+-  die "spamd: invalid ssl-version: $opt{'ssl-version'}\n";
+-}
+-
+ $opt{'server-key'}  ||= "$LOCAL_RULES_DIR/certs/server-key.pem";
+ $opt{'server-cert'} ||= "$LOCAL_RULES_DIR/certs/server-cert.pem";
+ 
+@@ -899,9 +893,8 @@ sub compose_listen_info_string {
+                       $socket_info->{ip_addr}, $socket_info->{port}));
+ 
+     } elsif ($socket->isa('IO::Socket::SSL')) {
+-      push(@listeninfo, sprintf("SSL [%s]:%s, ssl version %s",
+-                      $socket_info->{ip_addr}, $socket_info->{port},
+-                      $opt{'ssl-version'}||'sslv3'));
++      push(@listeninfo, sprintf("SSL [%r]:%s", $socket_info->{ip_addr},
++                      $socket_info->{port}));
+     }
+   }
+ 
+@@ -1072,7 +1065,6 @@ sub server_sock_setup_inet {
+     $sockopt{V6Only} = 1  if $io_socket_module_name eq 'IO::Socket::IP'
+                              && IO::Socket::IP->VERSION >= 0.09;
+     %sockopt = (%sockopt, (
+-      SSL_version     => $sslversion,
+       SSL_verify_mode => 0x00,
+       SSL_key_file    => $opt{'server-key'},
+       SSL_cert_file   => $opt{'server-cert'},
+@@ -1093,7 +1085,8 @@ sub server_sock_setup_inet {
+     if (!$server_inet) {
+       $diag = sprintf("could not create %s socket on [%s]:%s: %s",
+                       $ssl ? 'IO::Socket::SSL' : $io_socket_module_name,
+-                      $adr, $port, $!);
++                      $adr, $port, $ssl && $IO::Socket::SSL::SSL_ERROR ?
++                      "$!,$IO::Socket::SSL::SSL_ERROR" : $!);
+       push(@diag_fail, $diag);
+     } else {
+       $diag = sprintf("created %s socket on [%s]:%s",
+@@ -3238,7 +3231,6 @@ Options:
+  -H [dir], --helper-home-dir[=dir] Specify a different HOME directory
+  --ssl                             Enable SSL on TCP connections
+  --ssl-port port                   Override --port setting for SSL connections
+- --ssl-version sslversion          Specify SSL protocol version to use
+  --server-key keyfile              Specify an SSL keyfile
+  --server-cert certfile            Specify an SSL certificate
+  --socketpath=path                 Listen on a given UNIX domain socket
+@@ -3727,14 +3719,6 @@ Optionally specifies the port number for
+ SSL connections (default: whatever --port uses).  See B<--ssl> for
+ more details.
+ 
+-=item B<--ssl-version>=I<sslversion>
+-
+-Specify the SSL protocol version to use, one of B<sslv3> or B<tlsv1>.
+-The default, B<sslv3>, is the most flexible, accepting a SSLv3 or
+-higher hello handshake, then negotiating use of SSLv3 or TLSv1
+-protocol if the client can accept it.  Specifying B<--ssl-version>
+-implies B<--ssl>.
+-
+ =item B<--server-key> I<keyfile>
+ 
+ Specify the SSL key file to use for SSL connections.
+--- spamc/spamc.pod.orig
++++ spamc/spamc.pod
+@@ -177,12 +177,10 @@ The default is 1 time (ie. one attempt a
+ Sleep for I<sleep> seconds between failed spamd filtering attempts.
+ The default is 1 second.
+ 
+-=item B<-S>, B<--ssl>, B<--ssl>=I<sslversion>
++=item B<-S>, B<--ssl>, B<--ssl>
+ 
+ If spamc was built with support for SSL, encrypt data to and from the
+ spamd process with SSL; spamd must support SSL as well.
+-I<sslversion> specifies the SSL protocol version to use, either
+-C<sslv3>, or C<tlsv1>. The default, is C<sslv3>.
+ 
+ =item B<-t> I<timeout>, B<--timeout>=I<timeout>
+ 
+--- t/spamd_ssl_tls.t.orig
++++ t/spamd_ssl_tls.t
+@@ -1,28 +0,0 @@ 
+-#!/usr/bin/perl
+-
+-use lib '.'; use lib 't';
+-use SATest; sa_t_init("spamd_ssl_tls");
+-use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
+-
+-exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
+-
+-# ---------------------------------------------------------------------------
+-
+-%patterns = (
+-
+-q{ Return-Path: sb55sb55 at yahoo.com}, 'firstline',
+-q{ Subject: There yours for FREE!}, 'subj',
+-q{ X-Spam-Status: Yes, score=}, 'status',
+-q{ X-Spam-Flag: YES}, 'flag',
+-q{ X-Spam-Level: **********}, 'stars',
+-q{ TEST_ENDSNUMS}, 'endsinnums',
+-q{ TEST_NOREALNAME}, 'noreal',
+-q{ This must be the very last line}, 'lastline',
+-
+-
+-);
+-
+-ok (sdrun ("-L --ssl --ssl-version=tlsv1 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert",
+-           "--ssl=tlsv1 < data/spam/001",
+-           \&patterns_run_cb));
+-ok_all_patterns();
+--- t/spamd_ssl_v3.t.orig
++++ t/spamd_ssl_v3.t
+@@ -1,28 +0,0 @@ 
+-#!/usr/bin/perl
+-
+-use lib '.'; use lib 't';
+-use SATest; sa_t_init("spamd_sslv3");
+-use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
+-
+-exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
+-
+-# ---------------------------------------------------------------------------
+-
+-%patterns = (
+-
+-q{ Return-Path: sb55sb55 at yahoo.com}, 'firstline',
+-q{ Subject: There yours for FREE!}, 'subj',
+-q{ X-Spam-Status: Yes, score=}, 'status',
+-q{ X-Spam-Flag: YES}, 'flag',
+-q{ X-Spam-Level: **********}, 'stars',
+-q{ TEST_ENDSNUMS}, 'endsinnums',
+-q{ TEST_NOREALNAME}, 'noreal',
+-q{ This must be the very last line}, 'lastline',
+-
+-
+-);
+-
+-ok (sdrun ("-L --ssl --ssl-version=sslv3 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert",
+-           "--ssl=sslv3 < data/spam/001",
+-           \&patterns_run_cb));
+-ok_all_patterns();
+--- t/spamd_ssl_accept_fail.t.orig
++++ t/spamd_ssl_accept_fail.t
+@@ -23,9 +23,9 @@ q{ This must be the very last line}, 'la
+ 
+ );
+ 
+-ok (start_spamd ("-L --ssl --ssl-version=sslv3 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert"));
++ok (start_spamd ("-L --ssl --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert"));
+ ok (spamcrun ("< data/spam/001", \&patterns_run_cb));
+-ok (spamcrun ("--ssl=sslv3  < data/spam/001", \&patterns_run_cb));
++ok (spamcrun ("--ssl < data/spam/001", \&patterns_run_cb));
+ ok (stop_spamd ());
+ 
+ ok_all_patterns();
+--- t/spamd_ssl.t.orig
++++ t/spamd_ssl.t
+@@ -2,10 +2,7 @@ 
+ 
+ use lib '.'; use lib 't';
+ use SATest; sa_t_init("spamd_ssl");
+-use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9),
+-    onfail => sub {
+-	warn "\n\nNote: This may not be a SpamAssassin bug, as some platforms require that you" .
+-	    "\nspecify a protocol in spamc --ssl option, and possibly in spamd --ssl-version.\n\n" };
++use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
+ 
+ exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
+ 
+--- MANIFEST.orig
++++ MANIFEST
+@@ -513,8 +513,6 @@ t/spamd_report_ifspam.t
+ t/spamd_sql_prefs.t
+ t/spamd_ssl.t
+ t/spamd_ssl_accept_fail.t
+-t/spamd_ssl_tls.t
+-t/spamd_ssl_v3.t
+ t/spamd_stop.t
+ t/spamd_symbols.t
+ t/spamd_syslog.t


Property changes on: trunk/mail/spamassassin/files/patch-bug7199
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/spamassassin/files/patch-bug7208
===================================================================
--- trunk/mail/spamassassin/files/patch-bug7208	                        (rev 0)
+++ trunk/mail/spamassassin/files/patch-bug7208	2018-05-30 14:05:54 UTC (rev 23556)
@@ -0,0 +1,29 @@
+--- lib/Mail/SpamAssassin/Plugin/URILocalBL.pm	2015/06/10 12:15:22	1684652
++++ lib/Mail/SpamAssassin/Plugin/URILocalBL.pm	2015/06/10 12:18:50	1684653
+@@ -350,7 +350,7 @@
+     # look for W3 links only
+     next unless (defined $info->{types}->{a});
+ 
+-    while (my($host, $domain) = each $info->{hosts}) {
++    while (my($host, $domain) = each %{$info->{hosts}}) {
+ 
+       # skip if the domain name was matched
+       if (exists $rule->{exclusions} && exists $rule->{exclusions}->{$domain}) {
+@@ -374,7 +374,7 @@
+         }
+ 
+         if (exists $rule->{countries}) {
+-          dbg("check: uri_local_bl countries %s\n", join(' ', sort keys $rule->{countries}));
++          dbg("check: uri_local_bl countries %s\n", join(' ', sort keys %{$rule->{countries}}));
+ 
+           my $cc = $self->{geoip}->country_code_by_addr($ip);
+ 
+@@ -403,7 +403,7 @@
+         }
+ 
+         if (exists $rule->{isps}) {
+-          dbg("check: uri_local_bl isps %s\n", join(' ', map { '"' . $_ . '"'; } sort keys $rule->{isps}));
++          dbg("check: uri_local_bl isps %s\n", join(' ', map { '"' . $_ . '"'; } sort keys %{$rule->{isps}}));
+ 
+           my $isp = $self->{geoisp}->isp_by_name($ip);
+ 


Property changes on: trunk/mail/spamassassin/files/patch-bug7208
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/spamassassin/files/patch-bug7231
===================================================================
--- trunk/mail/spamassassin/files/patch-bug7231	                        (rev 0)
+++ trunk/mail/spamassassin/files/patch-bug7231	2018-05-30 14:05:54 UTC (rev 23556)
@@ -0,0 +1,27 @@
+--- lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm	2015/08/04 23:14:23	1694125
++++ lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm	2015/08/04 23:16:38	1694126
+@@ -942,9 +942,8 @@
+     next unless (defined($str) && defined($dom));
+     dbg("uridnsbl: got($j) NS for $dom: $str");
+ 
+-    if ($str =~ /IN\s+NS\s+(\S+)/) {
+-      my $nsmatch = lc $1;
+-      $nsmatch =~ s/\.$//;
++    if ($rr->type eq 'NS') {
++      my $nsmatch = lc $rr->nsdname;  # available since at least Net::DNS 0.14
+       my $nsrhblstr = $nsmatch;
+       my $fullnsrhblstr = $nsmatch;
+ 
+@@ -1025,9 +1024,9 @@
+     }
+     dbg("uridnsbl: complete_a_lookup got(%d) A for %s: %s", $j,$hname,$str);
+ 
+-    local $1;
+-    if ($str =~ /IN\s+A\s+(\S+)/) {
+-      $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $1);
++    if ($rr->type eq 'A') {
++      my $ip_address = $rr->rdatastr;
++      $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $ip_address);
+     }
+   }
+ }


Property changes on: trunk/mail/spamassassin/files/patch-bug7231
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/spamassassin/files/patch-bug7265
===================================================================
--- trunk/mail/spamassassin/files/patch-bug7265	                        (rev 0)
+++ trunk/mail/spamassassin/files/patch-bug7265	2018-05-30 14:05:54 UTC (rev 23556)
@@ -0,0 +1,83 @@
+--- lib/Mail/SpamAssassin/DnsResolver.pm	(revision 1715195)
++++ lib/Mail/SpamAssassin/DnsResolver.pm	(working copy)
+@@ -725,6 +725,37 @@
+ 
+ ###########################################################################
+ 
++=item $id = $res->bgread()
++
++Similar to C<Net::DNS::Resolver::bgread>.  Reads a DNS packet from
++a supplied socket, decodes it, and returns a Net::DNS::Packet object
++if successful.  Dies on error.
++
++=cut
++
++sub bgread() {
++  my ($self) = @_;
++  my $sock = $self->{sock};
++  my $packetsize = $self->{res}->udppacketsize;
++  $packetsize = 512  if $packetsize < 512;  # just in case
++  my $data = '';
++  my $peeraddr = $sock->recv($data, $packetsize+256);  # with some size margin for troubleshooting
++  defined $peeraddr or die "bgread: recv() failed: $!";
++  my $peerhost = $sock->peerhost;
++  $data ne '' or die "bgread: received empty packet from $peerhost";
++  dbg("dns: bgread: received %d bytes from %s", length($data), $peerhost);
++  my($answerpkt, $decoded_length) = Net::DNS::Packet->new(\$data);
++  $answerpkt or die "bgread: decoding DNS packet failed: $@";
++  $answerpkt->answerfrom($peerhost);
++  if ($decoded_length ne length($data)) {
++    warn sprintf("bgread: received a %d bytes packet from %s, decoded %d bytes\n",
++                 length($data), $peerhost, $decoded_length);
++  }
++  return $answerpkt;
++}
++
++###########################################################################
++
+ =item $nfound = $res->poll_responses()
+ 
+ See if there are any C<bgsend> reply packets ready, and return
+@@ -772,13 +803,25 @@
+     $timeout = 0;  # next time around collect whatever is available, then exit
+     last  if $nfound == 0;
+ 
+-    my $packet = $self->{res}->bgread($self->{sock});
++    my $packet;
++    eval {
++      $packet = $self->bgread();
++    } or do {
++      undef $packet;
++      my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
++      # resignal if alarm went off
++      die $eval_stat  if $eval_stat =~ /__alarm__ignore__\(.*\)/s;
++      info("dns: bad dns reply: %s", $eval_stat);
++    };
+ 
++#   Bug 7265, use our own bgread()
++#   my $packet = $self->{res}->bgread($self->{sock});
++
+     if (!$packet) {
+-      my $dns_err = $self->{res}->errorstring;
+-      # resignal if alarm went off
+-      die "dns (3) $dns_err\n"  if $dns_err =~ /__alarm__ignore__\(.*\)/s;
+-      info("dns: bad dns reply: $dns_err");
++      # error already reported above
++#     my $dns_err = $self->{res}->errorstring;
++#     die "dns (3) $dns_err\n"  if $dns_err =~ /__alarm__ignore__\(.*\)/s;
++#     info("dns: bad dns reply: $dns_err");
+     } else {
+       my $header = $packet->header;
+       if (!$header) {
+--- lib/Mail/SpamAssassin/Plugin/DKIM.pm	(revision 1715196)
++++ lib/Mail/SpamAssassin/Plugin/DKIM.pm	(working copy)
+@@ -794,7 +794,8 @@
+         # Only do so if EDNS0 provides a reasonably-sized UDP payload size,
+         # as our interface does not provide a DNS fallback to TCP, unlike
+         # the Net::DNS::Resolver::send which does provide it.
+-        my $res = $self->{main}->{resolver}->get_resolver;
++        my $res = $self->{main}->{resolver};
++        dbg("dkim: providing our own resolver: %s", ref $res);
+         Mail::DKIM::DNS::resolver($res);
+       }
+     }


Property changes on: trunk/mail/spamassassin/files/patch-bug7265
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/mail/spamassassin/files/patch-bug7404
===================================================================
--- trunk/mail/spamassassin/files/patch-bug7404	                        (rev 0)
+++ trunk/mail/spamassassin/files/patch-bug7404	2018-05-30 14:05:54 UTC (rev 23556)
@@ -0,0 +1,23 @@
+--- lib/Mail/SpamAssassin/PerMsgStatus.pm
++++ lib/Mail/SpamAssassin/PerMsgStatus.pm
+@@ -916,16 +916,16 @@
+     $str .= shift @{$ary};
+   }
+   undef $ary;
+-  chomp ($str); $str .= " [...]\n";
+ 
+   # in case the last line was huge, trim it back to around 200 chars
+   local $1;
+-  $str =~ s/^(.{,200}).*$/$1/gs;
++  $str =~ s/^(.{200}).+$/$1 [...]/gm;
++  chomp ($str); $str .= "\n";
+ 
+   # now, some tidy-ups that make things look a bit prettier
+-  $str =~ s/-----Original Message-----.*$//gs;
++  $str =~ s/-----Original Message-----.*$//gm;
+   $str =~ s/This is a multi-part message in MIME format\.//gs;
+-  $str =~ s/[-_\*\.]{10,}//gs;
++  $str =~ s/[-_*.]{10,}//gs;
+   $str =~ s/\s+/ /gs;
+ 
+   # add "Content preview:" ourselves, so that the text aligns


Property changes on: trunk/mail/spamassassin/files/patch-bug7404
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/mail/spamassassin/files/pkg-message.in
===================================================================
--- trunk/mail/spamassassin/files/pkg-message.in	2018-05-28 23:13:54 UTC (rev 23555)
+++ trunk/mail/spamassassin/files/pkg-message.in	2018-05-30 14:05:54 UTC (rev 23556)
@@ -1,18 +1,25 @@
+==========================================================================
+
 You should complete the following post-installation tasks:
 
 	1) Read %%DOCSDIR%%/INSTALL
 	   and %%DOCSDIR%%/UPGRADE
 	   BEFORE enabling SpamAssassin for important changes
-	
+
 	2) Edit the configuration in %%ETCDIR%%,
 	   in particular %%ETCDIR%%/init.pre
 	   You may get lots of annoying (but harmless) error messages
 	   if you skip this step.
-	
+
 	3) To run spamd, add the following to /etc/rc.conf:
 	   spamd_enable="YES"
 
-	4) Install mail/spamass-rules if you want some third-party
+	4) If this is a new installation, you should run sa-update
+	   and sa-compile. If this isn't a new installation, you
+	   should probably run those commands on a regular basis
+	   anyway.
+
+	5) Install mail/spamass-rules if you want some third-party
 	   spam-catching rulesets
 
 SECURITY NOTE:
@@ -20,3 +27,5 @@
 to change this, add the following to /etc/rc.conf:
 
 	spamd_flags="-u spamd -H /var/spool/spamd"
+
+==========================================================================

Modified: trunk/mail/spamassassin/files/sa-spamd.in
===================================================================
--- trunk/mail/spamassassin/files/sa-spamd.in	2018-05-28 23:13:54 UTC (rev 23555)
+++ trunk/mail/spamassassin/files/sa-spamd.in	2018-05-30 14:05:54 UTC (rev 23556)
@@ -1,6 +1,7 @@
 #!/bin/sh
 #
-# $MidnightBSD$
+# $FreeBSD: head/mail/spamassassin/files/sa-spamd.in 376379 2015-01-06 01:05:46Z marino $
+#
 
 # PROVIDE: spamd
 # REQUIRE: LOGIN
@@ -42,6 +43,7 @@
 pidfile=${spamd_pidfile:-"/var/run/${name}/${name}.pid"}
 command=%%PREFIX%%/bin/${name}
 command_args="-d -r ${pidfile}"
+#command_interpreter="%%PREFIX%%/bin/perl"
 required_dirs="%%PREFIX%%/share/spamassassin"
 
 precmd()

Modified: trunk/mail/spamassassin/pkg-plist
===================================================================
--- trunk/mail/spamassassin/pkg-plist	2018-05-28 23:13:54 UTC (rev 23555)
+++ trunk/mail/spamassassin/pkg-plist	2018-05-30 14:05:54 UTC (rev 23556)
@@ -1,4 +1,4 @@
- at unexec if service sa-spamd status | grep -q "spamd is running"; then service sa-spamd stop; fi
+ at preunexec if service sa-spamd status | grep -q "spamd is running"; then service sa-spamd stop; fi
 bin/sa-awl
 bin/sa-check_spamd
 bin/sa-compile
@@ -221,5 +221,3 @@
 @postunexec pw usershow "%%USER%%" 2>/dev/null 1>&2 && echo "To delete %%USER%% permanently, 'rmuser %%USER%%'"
 @postunexec pw usershow "%%USER%%" 2>/dev/null 1>&2 && [ -d /var/spool/spamd ] && echo "    Note that this will remove /var/spool/spamd"
 @comment ##################################################################
- at postexec if [ "%%UPDATE_ON_INSTALL%%" = "yes" ]; then echo "====> Downloading SpamAssassin rulesets"; %%PREFIX%%/bin/spamassassin -x -L --lint; %%PREFIX%%/bin/sa-update || true; fi
- at postexec if [ "%%UPDATE_ON_INSTALL%%" = "yes" ]; then echo "====> Compiling SpamAssassin rulesets"; %%PREFIX%%/bin/spamassassin -x -L --lint; %%PREFIX%%/bin/sa-compile || true; fi



More information about the Midnightbsd-cvs mailing list