diff options
author | ohauer <ohauer@FreeBSD.org> | 2014-03-16 00:42:26 +0800 |
---|---|---|
committer | ohauer <ohauer@FreeBSD.org> | 2014-03-16 00:42:26 +0800 |
commit | aaccf23a56859cb52e42a34204d76670f099fa86 (patch) | |
tree | e65e904003a7b5de21e406ee2572b4355557fb27 /mail | |
parent | 3803cfa8ed7424d2465400651888cd17494918c7 (diff) | |
download | freebsd-ports-gnome-aaccf23a56859cb52e42a34204d76670f099fa86.tar.gz freebsd-ports-gnome-aaccf23a56859cb52e42a34204d76670f099fa86.tar.zst freebsd-ports-gnome-aaccf23a56859cb52e42a34204d76670f099fa86.zip |
- 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)
Diffstat (limited to 'mail')
5 files changed, 227 insertions, 17 deletions
diff --git a/mail/postfix-policyd-weight/Makefile b/mail/postfix-policyd-weight/Makefile index 8402058c0358..12794ea44bac 100644 --- a/mail/postfix-policyd-weight/Makefile +++ b/mail/postfix-policyd-weight/Makefile @@ -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 <bsd.port.pre.mk> - -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 <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/mail/postfix-policyd-weight/distinfo b/mail/postfix-policyd-weight/distinfo index b2a373d8b1a0..fa3c88547562 100644 --- a/mail/postfix-policyd-weight/distinfo +++ b/mail/postfix-policyd-weight/distinfo @@ -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 diff --git a/mail/postfix-policyd-weight/files/patch-man__man5__policyd-weight.conf.5 b/mail/postfix-policyd-weight/files/patch-man__man5__policyd-weight.conf.5 new file mode 100644 index 000000000000..84af57e71960 --- /dev/null +++ b/mail/postfix-policyd-weight/files/patch-man__man5__policyd-weight.conf.5 @@ -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 + ); + diff --git a/mail/postfix-policyd-weight/files/patch-policyd-weight b/mail/postfix-policyd-weight/files/patch-policyd-weight new file mode 100644 index 000000000000..0fa75ec7f040 --- /dev/null +++ b/mail/postfix-policyd-weight/files/patch-policyd-weight @@ -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 ); diff --git a/mail/postfix-policyd-weight/files/patch-policyd-weight.conf.sample b/mail/postfix-policyd-weight/files/patch-policyd-weight.conf.sample new file mode 100644 index 000000000000..c966eea842f4 --- /dev/null +++ b/mail/postfix-policyd-weight/files/patch-policyd-weight.conf.sample @@ -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 + |