From owner-svn-ports-head@FreeBSD.ORG Sat Mar 15 16:42:28 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14137EA3; Sat, 15 Mar 2014 16:42:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F3423BEC; Sat, 15 Mar 2014 16:42:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2FGgR8I074260; Sat, 15 Mar 2014 16:42:27 GMT (envelope-from ohauer@svn.freebsd.org) Received: (from ohauer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2FGgQO6074255; Sat, 15 Mar 2014 16:42:26 GMT (envelope-from ohauer@svn.freebsd.org) Message-Id: <201403151642.s2FGgQO6074255@svn.freebsd.org> From: Olli Hauer Date: Sat, 15 Mar 2014 16:42:26 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r348351 - in head/mail/postfix-policyd-weight: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2014 16:42:28 -0000 Author: ohauer Date: Sat Mar 15 16:42:26 2014 New Revision: 348351 URL: http://svnweb.freebsd.org/changeset/ports/348351 QAT: https://qat.redports.org/buildarchive/r348351/ Log: - update to 0.1.15.2 (beta1 -> beta2) - use patches instead post-patch and sync man pages - adopt some patches from debian - install sample config with mode 644 instead 444 - add dnsbl-1.uceprotect.net as possible candidate to sample config (commented out per default) Added: head/mail/postfix-policyd-weight/files/patch-man__man5__policyd-weight.conf.5 (contents, props changed) head/mail/postfix-policyd-weight/files/patch-policyd-weight (contents, props changed) head/mail/postfix-policyd-weight/files/patch-policyd-weight.conf.sample (contents, props changed) Modified: head/mail/postfix-policyd-weight/Makefile head/mail/postfix-policyd-weight/distinfo Modified: head/mail/postfix-policyd-weight/Makefile ============================================================================== --- head/mail/postfix-policyd-weight/Makefile Sat Mar 15 16:39:46 2014 (r348350) +++ head/mail/postfix-policyd-weight/Makefile Sat Mar 15 16:42:26 2014 (r348351) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= policyd-weight -PORTVERSION= 0.1.15.1 -PORTREVISION= 3 +PORTVERSION= 0.1.15.2 CATEGORIES= mail MASTER_SITES= http://www.policyd-weight.org/releases/ \ LOCAL/ohauer @@ -30,21 +29,10 @@ USES= perl5 USE_PERL5= run NO_BUILD= yes -.include - -post-patch: -# really remove dead lists -# SFNET bug ID: 2765629, 3400804 -# rfc-ignorant: all entrieys will be marked as deprecated starting on 2012-09-30 -# njabl.org: NJABL is offline - @${REINPLACE_CMD} -e '/DSBL_ORG/d' -e '/IPv6_RBL/d' -e '/rfc-ignorant/d' \ - -e '/BL_NJABL/d' -e '/IX_MANITU/ s/,$$//' -e '/AHBL/ s/,$$//' \ - ${WRKSRC}/policyd-weight ${WRKSRC}/policyd-weight.conf.sample - do-install: ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ - ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${STAGEDIR}${PREFIX}/etc/ + ${INSTALL_DATA} -m 644 ${WRKSRC}/${PORTNAME}.conf.sample ${STAGEDIR}${PREFIX}/etc/ ${INSTALL_MAN} ${WRKSRC}/man/man5/policyd-weight.conf.5 ${STAGEDIR}${MAN5PREFIX}/man/man5/ ${INSTALL_MAN} ${WRKSRC}/man/man8/policyd-weight.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/ -.include +.include Modified: head/mail/postfix-policyd-weight/distinfo ============================================================================== --- head/mail/postfix-policyd-weight/distinfo Sat Mar 15 16:39:46 2014 (r348350) +++ head/mail/postfix-policyd-weight/distinfo Sat Mar 15 16:42:26 2014 (r348351) @@ -1,2 +1,2 @@ -SHA256 (policyd-weight-0.1.15.1.tar.gz) = aadbb7c62b5e5975167044d8567589b37199d7b3b983ad09d237ffdce830e0e5 -SIZE (policyd-weight-0.1.15.1.tar.gz) = 55787 +SHA256 (policyd-weight-0.1.15.2.tar.gz) = 7aee2b5b71a89dd774d8dfff761e0ddc7910b38dbe42f895ca21e8af7a30bb42 +SIZE (policyd-weight-0.1.15.2.tar.gz) = 75347 Added: head/mail/postfix-policyd-weight/files/patch-man__man5__policyd-weight.conf.5 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/postfix-policyd-weight/files/patch-man__man5__policyd-weight.conf.5 Sat Mar 15 16:42:26 2014 (r348351) @@ -0,0 +1,35 @@ +--- ./man/man5/policyd-weight.conf.5.orig 2011-09-18 14:27:29.000000000 +0200 ++++ ./man/man5/policyd-weight.conf.5 2014-03-15 17:15:33.000000000 +0100 +@@ -101,7 +101,7 @@ + .IP "\fB$PIDFILE\fR (default: /var/run/policyd-weight.pid)" + Path and filename to store the master pid (daemon mode) + +-.IP "\fB$LOCKPATH\fR (default: /tmp/.policyd-weight/)" ++.IP "\fB$LOCKPATH\fR (default: /var/run/policyd-weight/)" + Directory where policyd-weight stores sockets and lock-files/directories. Its + argument must contain a trailing slash. + +@@ -304,9 +304,8 @@ + + @dnsbl_score = ( + "pbl.spamhaus.org", 3.25, 0, "DYN_PBL_SPAMHAUS", +- "dnsbl.njabl.org", 4.25, -1.5, "BL_NJABL", +- "bl.spamcop.net", 1.75, -1.5, "SPAMCOP", + "sbl-xbl.spamhaus.org", 4.35, -1.5, "SBL_XBL_SPAMHAUS", ++ "bl.spamcop.net", 1.75, -1.5, "SPAMCOP", + "ix.dnsbl.manitu.net", 4.35, 0, "IX_MANITU" + .br + ); +@@ -330,10 +329,8 @@ + The default is: + + @rhsbl_score = ( +- "rhsbl.ahbl.org", 1.8, 0, "AHBL", +- "dsn.rfc-ignorant.org", 3.2, 0, "DSN_RFCI", +- "postmaster.rfc-ignorant.org", 1 , 0, "PM_RFCI", +- "abuse.rfc-ignorant.org", 1, 0, "ABUSE_RFCI" ++ 'multi.surbl.org', 4, 0, 'SURBL', ++ 'rhsbl.ahbl.org', 4, 0, 'AHBL' + .br + ); + Added: head/mail/postfix-policyd-weight/files/patch-policyd-weight ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/postfix-policyd-weight/files/patch-policyd-weight Sat Mar 15 16:42:26 2014 (r348351) @@ -0,0 +1,144 @@ +--- ./policyd-weight.orig 2011-09-03 15:55:02.000000000 +0200 ++++ ./policyd-weight 2014-03-15 17:15:33.000000000 +0100 +@@ -320,7 +320,7 @@ + + my $DEBUG = 0; # 1 or 0 - don't comment + +-my $REJECTMSG = "550 Mail appeared to be SPAM or forged. Ask your Mail/DNS-Administrator to correct HELO and DNS MX settings or to get removed from DNSBLs"; ++my $REJECTMSG = "550 Mail appeared to be SPAM or forged. Ask your Mail/DNS-Administrator to correct HELO and DNS MX settings or to get removed from DNSBLs"; + + my $REJECTLEVEL = 1; # Mails with scores which exceed this + # REJECTLEVEL will be rejected +@@ -374,9 +374,7 @@ + 'pbl.spamhaus.org', 3.25, 0, 'DYN_PBL_SPAMHAUS', + 'sbl-xbl.spamhaus.org', 4.35, -1.5, 'SBL_XBL_SPAMHAUS', + 'bl.spamcop.net', 3.75, -1.5, 'SPAMCOP', +- 'dnsbl.njabl.org', 4.25, -1.5, 'BL_NJABL', + 'ix.dnsbl.manitu.net', 4.35, 0, 'IX_MANITU' +- #'rbl.ipv6-world.net', 4.25, 0, 'IPv6_RBL' #don't use, kept for testing failures! + ); + + my $MAXDNSBLHITS = 2; # If Client IP is listed in MORE +@@ -392,10 +390,7 @@ + ## RHSBL settings + my @rhsbl_score = ( + 'multi.surbl.org', 4, 0, 'SURBL', +- 'rhsbl.ahbl.org', 4, 0, 'AHBL', +- 'dsn.rfc-ignorant.org', 3.5, 0, 'DSN_RFCI', +- 'postmaster.rfc-ignorant.org', 0.1, 0, 'PM_RFCI', +- 'abuse.rfc-ignorant.org', 0.1, 0, 'ABUSE_RFCI' ++ 'rhsbl.ahbl.org', 4, 0, 'AHBL' + ); + + my $BL_ERROR_SKIP = 2; # skip a RBL if this RBL had this many continuous +@@ -404,7 +399,7 @@ + my $BL_SKIP_RELEASE = 10; # skip a RBL for that many times + + ## cache stuff +-my $LOCKPATH = '/tmp/.policyd-weight/'; # must be a directory (add ++my $LOCKPATH = '/var/run/policyd-weight/'; # must be a directory (add + # trailing slash) + + my $SPATH = $LOCKPATH.'/polw.sock'; # socket path for the cache +@@ -426,7 +421,7 @@ + + my $CACHEMAXSIZE = 4000; # at this number of entries cleanup takes place + +-my $CACHEREJECTMSG = '550 temporarily blocked because of previous errors'; ++my $CACHEREJECTMSG = $REJECTMSG . " [cached]"; + + my $NTTL = 1; # after NTTL retries the cache entry is deleted + +@@ -582,7 +577,7 @@ + my $my_PTIME; + my $my_TEMP_PTIME; + +-if(!($conf)) ++if(not defined $conf) + { + if( -f "/etc/policyd-weight.conf") + { +@@ -605,7 +600,7 @@ + my $conf_err; + my $conf_str; + our $old_mtime; +-if($conf ne "") ++if(defined $conf) + { + if(sprintf("%04o",(stat($conf))[2]) !~ /(7|6|3|2)$/) + { +@@ -652,8 +647,12 @@ + if($CMD_DEBUG == 1) + { + $DEBUG = 1; +- $conf_str =~ s/\#.*?(\n)/$1/gs; +- $conf_str =~ s/\n+/\n/g; ++ if (defined $conf_str) { ++ $conf_str =~ s/\#.*?(\n)/$1/gs; ++ $conf_str =~ s/\n+/\n/g; ++ } ++ else { $conf_str = "" } ++ + print "config: $conf\n".$conf_str."\n"; + $SPATH .= ".debug"; + +@@ -673,7 +672,7 @@ + print "debug: USER: $USER\n"; + print "debug: GROUP: $GROUP\n"; + print "debug: issuing user: ".getpwuid($<)."\n"; +- print "debug: issuing group: ".getpwuid($()."\n"; ++ print "debug: issuing group: ".getgrgid($()."\n"; + } + + $conf_str = ""; +@@ -893,12 +892,12 @@ + + + # watch the version string, I'm afraid that they change to x.x.x notation +-if(Net::DNS->version() >= 0.50) ++if(Net::DNS->version() >= 0.50 && Net::DNS->version() <= 0.53) + { + $res->force_v4(1); # force ipv4 usage, autodetection is broken till + # Net::DNS 0.53 + } +-else ++if(Net::DNS->version() < 0.50) + { + $res->igntc(1); # ignore truncated packets if Net-DNS version is + # lower than 0.50 +@@ -2282,7 +2281,7 @@ + + + ## HELO numeric check ######################################################### +- my $glob_numeric_score; ++ my $glob_numeric_score = 0; + # check /1.2.3.4/ and /[1.2.3.4]/ + if($helo =~ /^[\d|\[][\d\.]+[\d|\]]$/) + { +@@ -2844,7 +2843,7 @@ + my $sender = shift(@_) || ''; + my $domain = shift(@_) || ''; + +- $! = ''; ++ $! = undef; + $@ = (); + if( (!($csock)) || ($csock && (!($csock->connected))) ) + { +@@ -2972,7 +2971,7 @@ + die $!; + } + +- if(!( $( = getpwnam($USER) )) ++ if(!( $( = getgrnam($GROUP) )) + { + mylog(warning=>"cache: couldn't change GID to user $GROUP: $!"); + } +@@ -3842,7 +3841,7 @@ + my $helo = shift; + my $ip = shift; + +- if($$helo !~ /^\[(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\]$/ ) { return } ++ if($$helo !~ /^\[(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\]$/ ) { return 0 } + my $tmp_helo_ip = $1; + + my $tmpip = inet_aton( $tmp_helo_ip ); Added: head/mail/postfix-policyd-weight/files/patch-policyd-weight.conf.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/postfix-policyd-weight/files/patch-policyd-weight.conf.sample Sat Mar 15 16:42:26 2014 (r348351) @@ -0,0 +1,43 @@ +--- ./policyd-weight.conf.sample.orig 2011-09-03 16:10:01.000000000 +0200 ++++ ./policyd-weight.conf.sample 2014-03-15 17:15:33.000000000 +0100 +@@ -59,9 +59,8 @@ + 'pbl.spamhaus.org', 3.25, 0, 'DYN_PBL_SPAMHAUS', + 'sbl-xbl.spamhaus.org', 4.35, -1.5, 'SBL_XBL_SPAMHAUS', + 'bl.spamcop.net', 3.75, -1.5, 'SPAMCOP', +- 'dnsbl.njabl.org', 4.25, -1.5, 'BL_NJABL', ++# 'dnsbl-1.uceprotect.net', 4.35, 0, 'UCE_1', + 'ix.dnsbl.manitu.net', 4.35, 0, 'IX_MANITU' +- #'rbl.ipv6-world.net', 4.25, 0, 'IPv6_RBL' #don't use, kept for testing failures! + ); + + $MAXDNSBLHITS = 2; # If Client IP is listed in MORE +@@ -77,10 +76,7 @@ + ## RHSBL settings + @rhsbl_score = ( + 'multi.surbl.org', 4, 0, 'SURBL', +- 'rhsbl.ahbl.org', 4, 0, 'AHBL', +- 'dsn.rfc-ignorant.org', 3.5, 0, 'DSN_RFCI', +- 'postmaster.rfc-ignorant.org', 0.1, 0, 'PM_RFCI', +- 'abuse.rfc-ignorant.org', 0.1, 0, 'ABUSE_RFCI' ++ 'rhsbl.ahbl.org', 4, 0, 'AHBL' + ); + + $BL_ERROR_SKIP = 2; # skip a RBL if this RBL had this many continuous +@@ -89,7 +85,7 @@ + $BL_SKIP_RELEASE = 10; # skip a RBL for that many times + + ## cache stuff +- $LOCKPATH = '/tmp/.policyd-weight/'; # must be a directory (add ++ $LOCKPATH = '/var/run/policyd-weight/'; # must be a directory (add + # trailing slash) + + $SPATH = $LOCKPATH.'/polw.sock'; # socket path for the cache +@@ -111,7 +107,7 @@ + + $CACHEMAXSIZE = 4000; # at this number of entries cleanup takes place + +- $CACHEREJECTMSG = '550 temporarily blocked because of previous errors'; ++ $CACHEREJECTMSG = $REJECTMSG . " [cached]"; + + $NTTL = 1; # after NTTL retries the cache entry is deleted +