diff -Nru postfix-policyd-spf-perl-2.009/CHANGES postfix-policyd-spf-perl-2.010/CHANGES --- postfix-policyd-spf-perl-2.009/CHANGES 2012-02-04 04:25:17.000000000 +0000 +++ postfix-policyd-spf-perl-2.010/CHANGES 2012-06-18 03:50:55.000000000 +0000 @@ -4,6 +4,14 @@ # ! = Changed something significant, or removed a feature # * = Fixed a bug, or made a minor improvement +--- 2.010 2012-06-17 + * Fixed incorrect use of != instead of ne for string comparison + (LP: #1014243) + ! Changed non-standard X-Comment header fields for localhost and + whitelisted addresses to use RFC 5451 Authentication Results header + fields + ! Added depenency on Sys::Hostname::Long for local hostname determination + --- 2.009 2012-02-03 * Chomp erroneus NULLs off the end of local and authority explanations to work around a Mail::SPF bug (in Mail::SPF versions prior to 2.008) diff -Nru postfix-policyd-spf-perl-2.009/debian/changelog postfix-policyd-spf-perl-2.010/debian/changelog --- postfix-policyd-spf-perl-2.009/debian/changelog 2012-06-18 21:50:41.000000000 +0000 +++ postfix-policyd-spf-perl-2.010/debian/changelog 2012-06-18 21:50:42.000000000 +0000 @@ -1,3 +1,13 @@ +postfix-policyd-spf-perl (2.010-1) unstable; urgency=low + + * New upstream release + - Updated debian/patches/use-debian-mailname to work with new upstream use + of libsys-hostname-long-perl + - Added depends on libsys-hostname-long-perl + - Updated debian/copyright + + -- Scott Kitterman Sun, 17 Jun 2012 23:55:06 -0400 + postfix-policyd-spf-perl (2.009-2) unstable; urgency=low * Fix debian watch to work with Launchpad again diff -Nru postfix-policyd-spf-perl-2.009/debian/control postfix-policyd-spf-perl-2.010/debian/control --- postfix-policyd-spf-perl-2.009/debian/control 2012-06-18 21:50:41.000000000 +0000 +++ postfix-policyd-spf-perl-2.010/debian/control 2012-06-18 21:50:42.000000000 +0000 @@ -8,7 +8,7 @@ Package: postfix-policyd-spf-perl Architecture: all -Depends: ${misc:Depends}, ${perl:Depends}, postfix, libversion-perl, libnetaddr-ip-perl (>= 4), libmail-spf-perl (>= 2.006), adduser +Depends: ${misc:Depends}, ${perl:Depends}, postfix, libversion-perl, libnetaddr-ip-perl (>= 4), libmail-spf-perl (>= 2.006), adduser, libsys-hostname-long-perl Description: Simple Postfix policy server for RFC 4408 SPF checking postfix-policyd-spf-perl is a basic Postfix SMTP policy server for SPF checking. It is implemented in pure Perl and uses the Mail::SPF module. The diff -Nru postfix-policyd-spf-perl-2.009/debian/copyright postfix-policyd-spf-perl-2.010/debian/copyright --- postfix-policyd-spf-perl-2.009/debian/copyright 2012-06-18 21:50:41.000000000 +0000 +++ postfix-policyd-spf-perl-2.010/debian/copyright 2012-06-18 21:50:42.000000000 +0000 @@ -9,8 +9,9 @@ Copyright: © 2007-2008,2012 Scott Kitterman - © 2007 Julian Mehnle - © 2003-2004 Meng Weng Wong + © 2012 Allison Randal + © 2007 Julian Mehnle + © 2003-2004 Meng Weng Wong This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2). diff -Nru postfix-policyd-spf-perl-2.009/debian/patches/use-debian-mailname postfix-policyd-spf-perl-2.010/debian/patches/use-debian-mailname --- postfix-policyd-spf-perl-2.009/debian/patches/use-debian-mailname 2012-06-18 21:50:41.000000000 +0000 +++ postfix-policyd-spf-perl-2.010/debian/patches/use-debian-mailname 2012-06-18 21:50:42.000000000 +0000 @@ -3,11 +3,11 @@ Since /etc/mailname is Debian (and derivatives) specific, this is best handled as a distro patch and not upstream. 2012-01-19 -Index: postfix-policyd-spf-perl-2.009/postfix-policyd-spf-perl +Index: postfix-policyd-spf-perl-2.010/postfix-policyd-spf-perl =================================================================== ---- postfix-policyd-spf-perl-2.009.orig/postfix-policyd-spf-perl 2012-02-03 23:25:17.563473000 -0500 -+++ postfix-policyd-spf-perl-2.009/postfix-policyd-spf-perl 2012-02-03 23:36:43.477359452 -0500 -@@ -42,10 +42,22 @@ +--- postfix-policyd-spf-perl-2.010.orig/postfix-policyd-spf-perl 2012-06-17 23:50:55.621463000 -0400 ++++ postfix-policyd-spf-perl-2.010/postfix-policyd-spf-perl 2012-06-18 00:07:44.201358289 -0400 +@@ -43,10 +43,22 @@ # Makes for a total timeout for UDP queries of 5s * 2 = 10s. ); @@ -18,7 +18,7 @@ + close (MN); +} +else { -+ $MailName = `hostname -f`; ++ $MailName = hostname_long ; +} +chomp ($MailName); + @@ -30,3 +30,12 @@ query_rr_types => Mail::SPF::Server->query_rr_type_txt, default_authority_explanation => 'Please see http://www.openspf.net/Why?s=%{_scope};id=%{S};ip=%{C};r=%{R}' +@@ -95,7 +107,7 @@ + + # Fully qualified hostname, if available, for use in authentication results + # headers now provided by the localhost and whitelist checks. +-my $host = hostname_long; ++my $host = $MailName; + + my %results_cache; # by message instance + diff -Nru postfix-policyd-spf-perl-2.009/INSTALL postfix-policyd-spf-perl-2.010/INSTALL --- postfix-policyd-spf-perl-2.009/INSTALL 2012-02-04 04:25:17.000000000 +0000 +++ postfix-policyd-spf-perl-2.010/INSTALL 2012-06-18 03:50:55.000000000 +0000 @@ -7,7 +7,8 @@ Perl 5.6 version NetAddr-IP 4 - Mail-SPF (not Mail-SPF-Query) version 2.006 or later + Mail::SPF (not Mail-SPF-Query) version 2.006 or later + Sys::Hostname::Long Installing ---------- diff -Nru postfix-policyd-spf-perl-2.009/postfix-policyd-spf-perl postfix-policyd-spf-perl-2.010/postfix-policyd-spf-perl --- postfix-policyd-spf-perl-2.009/postfix-policyd-spf-perl 2012-02-04 04:40:50.000000000 +0000 +++ postfix-policyd-spf-perl-2.010/postfix-policyd-spf-perl 2012-06-18 03:50:55.000000000 +0000 @@ -2,7 +2,7 @@ # postfix-policyd-spf-perl # http://www.openspf.org/Software -# version 2.009 +# version 2.010 # # (C) 2007-2008,2012 Scott Kitterman # (C) 2012 Allison Randal @@ -23,7 +23,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -use version; our $VERSION = qv('2.009'); +use version; our $VERSION = qv('2.010'); use strict; @@ -31,6 +31,7 @@ use Sys::Syslog qw(:DEFAULT setlogsock); use NetAddr::IP; use Mail::SPF; +use Sys::Hostname::Long 'hostname_long'; # ---------------------------------------------------------- # configuration @@ -92,6 +93,10 @@ qw( ) ); # add addresses to qw ( ) above separated by spaces using CIDR notation. +# Fully qualified hostname, if available, for use in authentication results +# headers now provided by the localhost and whitelist checks. +my $host = hostname_long; + my %results_cache; # by message instance # ---------------------------------------------------------- @@ -185,9 +190,9 @@ sub exempt_localhost { my %options = @_; my $attr = $options{attr}; - if ($attr->{client_address} != '') { + if ($attr->{client_address} ne '') { my $client_address = NetAddr::IP->new($attr->{client_address}); - return 'PREPEND X-Comment: SPF not applicable to localhost connection - skipped check' + return "PREPEND Authentication-Results: $host; none (SPF not checked for localhost)" if grep($_->contains($client_address), localhost_addresses); }; return 'DUNNO'; @@ -200,9 +205,9 @@ sub exempt_relay { my %options = @_; my $attr = $options{attr}; - if ($attr->{client_address} != '') { + if ($attr->{client_address} ne '') { my $client_address = NetAddr::IP->new($attr->{client_address}); - return 'PREPEND X-Comment: SPF skipped for whitelisted relay' + return "PREPEND Authentication-Results: $host; none (SPF not checked for whitelisted relay)" if grep($_->contains($client_address), relay_addresses); }; return 'DUNNO'; diff -Nru postfix-policyd-spf-perl-2.009/README postfix-policyd-spf-perl-2.010/README --- postfix-policyd-spf-perl-2.009/README 2012-02-04 04:25:17.000000000 +0000 +++ postfix-policyd-spf-perl-2.010/README 2012-06-18 03:50:55.000000000 +0000 @@ -1,4 +1,4 @@ -postfix-policyd-spf-perl 2.009 +postfix-policyd-spf-perl 2.010 A Postfix SMTPd policy server for SPF checking (C) 2007-2008,2012 Scott Kitterman (C) 2012 Allison Randal