Date: Sun, 11 Jan 2015 21:31:02 +0000 (UTC) From: Olli Hauer <ohauer@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r376806 - in branches/2015Q1/mail/postfix-policyd-weight: . files Message-ID: <201501112131.t0BLV2V0057998@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ohauer Date: Sun Jan 11 21:31:01 2015 New Revision: 376806 URL: https://svnweb.freebsd.org/changeset/ports/376806 QAT: https://qat.redports.org/buildarchive/r376806/ Log: MFH: r376658 - remove dead rhsbl.ahbl.org [1] - install policyd-weight.conf with the @sample macro - alert user if any of this deprecated lists is found in policyd-weight.conf dnsbl.njabl.org rbl.ipv6-world.net rhsbl.ahbl.org dsn.rfc-ignorant.org postmaster.rfc-ignorant.org abuse.rfc-ignorant.org [1] Noted by: Herbert J. Skuhra Approved by: portmgr (implicit) Added: branches/2015Q1/mail/postfix-policyd-weight/files/pkg-install.in - copied unchanged from r376658, head/mail/postfix-policyd-weight/files/pkg-install.in Modified: branches/2015Q1/mail/postfix-policyd-weight/Makefile branches/2015Q1/mail/postfix-policyd-weight/files/patch-man__man5__policyd-weight.conf.5 branches/2015Q1/mail/postfix-policyd-weight/files/patch-policyd-weight branches/2015Q1/mail/postfix-policyd-weight/files/patch-policyd-weight.conf.sample branches/2015Q1/mail/postfix-policyd-weight/files/pkg-message.in Directory Properties: branches/2015Q1/ (props changed) Modified: branches/2015Q1/mail/postfix-policyd-weight/Makefile ============================================================================== --- branches/2015Q1/mail/postfix-policyd-weight/Makefile Sun Jan 11 21:06:04 2015 (r376805) +++ branches/2015Q1/mail/postfix-policyd-weight/Makefile Sun Jan 11 21:31:01 2015 (r376806) @@ -3,7 +3,7 @@ PORTNAME= policyd-weight PORTVERSION= 0.1.15.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail MASTER_SITES= http://www.policyd-weight.org/releases/ \ LOCAL/ohauer @@ -17,8 +17,9 @@ LICENSE= GPLv2 RUN_DEPENDS= p5-Net-DNS>=0.72:${PORTSDIR}/dns/p5-Net-DNS \ p5-Net-IP>0:${PORTSDIR}/net-mgmt/p5-Net-IP -SUB_FILES= pkg-message -PLIST_FILES= bin/${PORTNAME} etc/${PORTNAME}.conf.sample \ +SUB_FILES= pkg-message pkg-install +PLIST_FILES= bin/${PORTNAME} \ + "@sample etc/${PORTNAME}.conf.sample" \ man/man5/policyd-weight.conf.5.gz \ man/man8/policyd-weight.8.gz @@ -31,9 +32,9 @@ USE_PERL5= run NO_BUILD= yes do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ - ${INSTALL_DATA} ${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/ + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + ${INSTALL_DATA} ${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 <bsd.port.mk> Modified: branches/2015Q1/mail/postfix-policyd-weight/files/patch-man__man5__policyd-weight.conf.5 ============================================================================== --- branches/2015Q1/mail/postfix-policyd-weight/files/patch-man__man5__policyd-weight.conf.5 Sun Jan 11 21:06:04 2015 (r376805) +++ branches/2015Q1/mail/postfix-policyd-weight/files/patch-man__man5__policyd-weight.conf.5 Sun Jan 11 21:31:01 2015 (r376806) @@ -1,6 +1,6 @@ ---- ./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 @@ +--- man/man5/policyd-weight.conf.5.orig 2011-09-18 12:27:29 UTC ++++ man/man5/policyd-weight.conf.5 +@@ -101,7 +101,7 @@ file changes. .IP "\fB$PIDFILE\fR (default: /var/run/policyd-weight.pid)" Path and filename to store the master pid (daemon mode) @@ -9,7 +9,7 @@ Directory where policyd-weight stores sockets and lock-files/directories. Its argument must contain a trailing slash. -@@ -304,9 +304,8 @@ +@@ -304,9 +304,8 @@ The default is: @dnsbl_score = ( "pbl.spamhaus.org", 3.25, 0, "DYN_PBL_SPAMHAUS", @@ -20,7 +20,7 @@ "ix.dnsbl.manitu.net", 4.35, 0, "IX_MANITU" .br ); -@@ -330,10 +329,8 @@ +@@ -330,10 +329,7 @@ A list of RHSBL hosts to be queried must The default is: @rhsbl_score = ( @@ -28,8 +28,7 @@ - "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' ++ 'multi.surbl.org', 4, 0, 'SURBL' .br ); Modified: branches/2015Q1/mail/postfix-policyd-weight/files/patch-policyd-weight ============================================================================== --- branches/2015Q1/mail/postfix-policyd-weight/files/patch-policyd-weight Sun Jan 11 21:06:04 2015 (r376805) +++ branches/2015Q1/mail/postfix-policyd-weight/files/patch-policyd-weight Sun Jan 11 21:31:01 2015 (r376806) @@ -1,6 +1,6 @@ ---- ./policyd-weight.orig 2011-09-03 15:55:02.000000000 +0200 -+++ ./policyd-weight 2014-05-25 14:34:09.000000000 +0200 -@@ -320,7 +320,7 @@ +--- policyd-weight.orig 2011-09-03 13:55:02 UTC ++++ policyd-weight +@@ -320,7 +320,7 @@ $SIG{__DIE__} = sub { my $DEBUG = 0; # 1 or 0 - don't comment @@ -9,7 +9,7 @@ my $REJECTLEVEL = 1; # Mails with scores which exceed this # REJECTLEVEL will be rejected -@@ -374,9 +374,7 @@ +@@ -374,9 +374,7 @@ my @dnsbl_score = ( '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', @@ -19,19 +19,20 @@ ); my $MAXDNSBLHITS = 2; # If Client IP is listed in MORE -@@ -392,10 +390,7 @@ +@@ -391,11 +389,7 @@ my $MAXDNSBLMSG = '550 Your MTA is lis + ## RHSBL settings my @rhsbl_score = ( - 'multi.surbl.org', 4, 0, 'SURBL', +- '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' ++ 'multi.surbl.org', 4, 0, 'SURBL' ); my $BL_ERROR_SKIP = 2; # skip a RBL if this RBL had this many continuous -@@ -404,7 +399,7 @@ +@@ -404,7 +398,7 @@ my $BL_ERROR_SKIP = 2; # skip a RBL my $BL_SKIP_RELEASE = 10; # skip a RBL for that many times ## cache stuff @@ -40,7 +41,7 @@ # trailing slash) my $SPATH = $LOCKPATH.'/polw.sock'; # socket path for the cache -@@ -426,7 +421,7 @@ +@@ -426,7 +420,7 @@ my $CACHESIZE = 2000; # set to 0 t my $CACHEMAXSIZE = 4000; # at this number of entries cleanup takes place @@ -49,7 +50,7 @@ my $NTTL = 1; # after NTTL retries the cache entry is deleted -@@ -582,7 +577,7 @@ +@@ -582,7 +576,7 @@ my %poscache; my $my_PTIME; my $my_TEMP_PTIME; @@ -58,7 +59,7 @@ { if( -f "/etc/policyd-weight.conf") { -@@ -605,7 +600,7 @@ +@@ -605,7 +599,7 @@ if(!($conf)) my $conf_err; my $conf_str; our $old_mtime; @@ -67,7 +68,7 @@ { if(sprintf("%04o",(stat($conf))[2]) !~ /(7|6|3|2)$/) { -@@ -652,8 +647,12 @@ +@@ -652,8 +646,12 @@ $GROUP = $USER unless $GROUP; if($CMD_DEBUG == 1) { $DEBUG = 1; @@ -82,7 +83,7 @@ print "config: $conf\n".$conf_str."\n"; $SPATH .= ".debug"; -@@ -673,7 +672,7 @@ +@@ -673,7 +671,7 @@ if($CMD_DEBUG == 1) print "debug: USER: $USER\n"; print "debug: GROUP: $GROUP\n"; print "debug: issuing user: ".getpwuid($<)."\n"; @@ -91,7 +92,7 @@ } $conf_str = ""; -@@ -893,12 +892,12 @@ +@@ -893,12 +891,12 @@ if($NS && $NS =~ /\d/) # watch the version string, I'm afraid that they change to x.x.x notation @@ -106,7 +107,7 @@ { $res->igntc(1); # ignore truncated packets if Net-DNS version is # lower than 0.50 -@@ -2282,7 +2281,7 @@ +@@ -2282,7 +2280,7 @@ sub weighted_check ## HELO numeric check ######################################################### @@ -115,7 +116,7 @@ # check /1.2.3.4/ and /[1.2.3.4]/ if($helo =~ /^[\d|\[][\d\.]+[\d|\]]$/) { -@@ -2844,7 +2843,7 @@ +@@ -2844,7 +2842,7 @@ sub cache_query my $sender = shift(@_) || ''; my $domain = shift(@_) || ''; @@ -124,7 +125,7 @@ $@ = (); if( (!($csock)) || ($csock && (!($csock->connected))) ) { -@@ -2972,7 +2971,7 @@ +@@ -2972,7 +2970,7 @@ sub spawn_cache die $!; } @@ -133,7 +134,7 @@ { mylog(warning=>"cache: couldn't change GID to user $GROUP: $!"); } -@@ -3588,7 +3587,7 @@ +@@ -3588,7 +3586,7 @@ sub rbl_lookup my ($id, $bf, $qc, $anc, $nsc, $arc, $qb) = unpack('n n n n n n a*', $buf); @@ -142,7 +143,7 @@ if(($id && $anc) && ($id == $oid) && ($query eq $dn)) { -@@ -3842,7 +3841,7 @@ +@@ -3842,7 +3840,7 @@ sub squared_helo my $helo = shift; my $ip = shift; Modified: branches/2015Q1/mail/postfix-policyd-weight/files/patch-policyd-weight.conf.sample ============================================================================== --- branches/2015Q1/mail/postfix-policyd-weight/files/patch-policyd-weight.conf.sample Sun Jan 11 21:06:04 2015 (r376805) +++ branches/2015Q1/mail/postfix-policyd-weight/files/patch-policyd-weight.conf.sample Sun Jan 11 21:31:01 2015 (r376806) @@ -1,5 +1,5 @@ ---- ./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 +--- policyd-weight.conf.sample.orig 2011-09-03 14:10:01 UTC ++++ policyd-weight.conf.sample @@ -59,9 +59,8 @@ 'pbl.spamhaus.org', 3.25, 0, 'DYN_PBL_SPAMHAUS', 'sbl-xbl.spamhaus.org', 4.35, -1.5, 'SBL_XBL_SPAMHAUS', @@ -11,19 +11,20 @@ ); $MAXDNSBLHITS = 2; # If Client IP is listed in MORE -@@ -77,10 +76,7 @@ +@@ -76,11 +75,7 @@ + ## RHSBL settings @rhsbl_score = ( - 'multi.surbl.org', 4, 0, 'SURBL', +- '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' ++ 'multi.surbl.org', 4, 0, 'SURBL' ); $BL_ERROR_SKIP = 2; # skip a RBL if this RBL had this many continuous -@@ -89,7 +85,7 @@ +@@ -89,7 +84,7 @@ $BL_SKIP_RELEASE = 10; # skip a RBL for that many times ## cache stuff @@ -32,7 +33,7 @@ # trailing slash) $SPATH = $LOCKPATH.'/polw.sock'; # socket path for the cache -@@ -111,7 +107,7 @@ +@@ -111,7 +106,7 @@ $CACHEMAXSIZE = 4000; # at this number of entries cleanup takes place Copied: branches/2015Q1/mail/postfix-policyd-weight/files/pkg-install.in (from r376658, head/mail/postfix-policyd-weight/files/pkg-install.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2015Q1/mail/postfix-policyd-weight/files/pkg-install.in Sun Jan 11 21:31:01 2015 (r376806, copy of r376658, head/mail/postfix-policyd-weight/files/pkg-install.in) @@ -0,0 +1,43 @@ +#!/bin/sh + +# make sure we detect a customized config and if one of the deprecated +# RBL/RHBL server is present alert the user to remove the entry + + +PREFIX=${PKG_PREFIX:=%%PREFIX%%} +CFG="${PREFIX}/etc/policyd-weight.conf" + +# list of deprecated server already removed from the default config +DEPRECATED_LIST="dnsbl.njabl.org rbl.ipv6-world.net rhsbl.ahbl.org dsn.rfc-ignorant.org postmaster.rfc-ignorant.org abuse.rfc-ignorant.org" + +# found deprecated RBS/RHBS servers" +NOTIFY_LIST="" + +_check_deprecated() { +if [ -s "${CFG}" ]; then + for i in ${DEPRECATED_LIST}; do + grep -q "${i}" ${CFG} && NOTIFY_LIST="${NOTIFY_LIST} ${i}" + done +fi + +if [ "${NOTIFY_LIST}" != "" ]; then + echo "======================== !!! WARNING !!! ========================" + echo + echo "Please make sure to remove the following deprecated entires from" + echo " ${CFG}" + echo + for i in ${NOTIFY_LIST}; do + echo " - ${i}" + done + echo + echo "else you risk to reject valid mails!" + echo "======================== !!! WARNING !!! ========================" + sleep 3 +fi +} + + +if [ "$2" = "POST-INSTALL" ]; then + _check_deprecated +fi + Modified: branches/2015Q1/mail/postfix-policyd-weight/files/pkg-message.in ============================================================================== --- branches/2015Q1/mail/postfix-policyd-weight/files/pkg-message.in Sun Jan 11 21:06:04 2015 (r376805) +++ branches/2015Q1/mail/postfix-policyd-weight/files/pkg-message.in Sun Jan 11 21:31:01 2015 (r376806) @@ -23,4 +23,7 @@ smtpd_recipient_restrictions = * edit %%PREFIX%%/etc/policyd-weight.conf * An example is provided in %%PREFIX%%/etc/policyd-weight.conf.sample * +* Please compare existing configuration with the provided sample +* and remove deprecated DNSBL/RHSBL lists +* *************
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501112131.t0BLV2V0057998>