Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package opendmarc I would like to update opendmarc in stretch for two reasons. One, I think, good and the other, so so. The good reason is that the package documentation has issues significant enough that people are filing bugs at the RC level because they think it is broken and they can't figure out how to set it up. I think that needs to be fixed. The so so reason is to bump from a 1.3.2 beta release to the final. It's primarily patch to source conversion and a bit of additional bug fixing. I think we're better off shipping the final. In order to make this easier to review, in addition to the full debdiff, I am including a patches applied upstream only diff to more clearly show the minimal changes in the upstream code. I think the risk of updating is negligible both based on the diff and the lack of issues reported on the generally very active upstream mailing list (I have waited a bit for this request to give others a chance to find any problems). Since it's not clear how much of this the release team will agree is appropriate, I have not uploaded to unstable, but I have a package that exactly matches the debdiff built and ready to dput if approved. unblock opendmarc/1.3.2-1
diff -Nru opendmarc-1.3.2~Beta1/configure opendmarc-1.3.2/configure --- opendmarc-1.3.2~Beta1/configure 2016-12-18 04:49:44.000000000 -0500 +++ opendmarc-1.3.2/configure 2017-03-04 08:28:59.000000000 -0500 @@ -3074,7 +3074,7 @@ # # library version, passed to libtool # -LIBOPENDMARC_VERSION_INFO=$(printf %d:%d:%d 2 1 0) +LIBOPENDMARC_VERSION_INFO=$(printf %d:%d:%d 2 2 0) # diff -Nru opendmarc-1.3.2~Beta1/configure.ac opendmarc-1.3.2/configure.ac --- opendmarc-1.3.2~Beta1/configure.ac 2016-12-18 04:48:45.000000000 -0500 +++ opendmarc-1.3.2/configure.ac 2017-03-04 08:28:39.000000000 -0500 @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # -# Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved. +# Copyright (c) 2012-2017, The Trusted Domain Project. All rights reserved. # Acceptable arguments to configure are: # The usual CC= etc. @@ -33,7 +33,7 @@ # m4_define([LIBVERSION_CURRENT], 2) -m4_define([LIBVERSION_REVISION], 1) +m4_define([LIBVERSION_REVISION], 2) m4_define([LIBVERSION_AGE], 0) # diff -Nru opendmarc-1.3.2~Beta1/contrib/init/generic/Makefile.in opendmarc-1.3.2/contrib/init/generic/Makefile.in --- opendmarc-1.3.2~Beta1/contrib/init/generic/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/contrib/init/generic/Makefile.in 2017-03-04 08:28:57.000000000 -0500 @@ -289,9 +289,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/init/generic/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/init/generic/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/init/generic/Makefile + $(AUTOMAKE) --foreign contrib/init/generic/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/contrib/init/redhat/Makefile.in opendmarc-1.3.2/contrib/init/redhat/Makefile.in --- opendmarc-1.3.2~Beta1/contrib/init/redhat/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/contrib/init/redhat/Makefile.in 2017-03-04 08:28:57.000000000 -0500 @@ -289,9 +289,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/init/redhat/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/init/redhat/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/init/redhat/Makefile + $(AUTOMAKE) --foreign contrib/init/redhat/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/contrib/Makefile.in opendmarc-1.3.2/contrib/Makefile.in --- opendmarc-1.3.2~Beta1/contrib/Makefile.in 2016-12-18 04:49:45.000000000 -0500 +++ opendmarc-1.3.2/contrib/Makefile.in 2017-03-04 08:28:57.000000000 -0500 @@ -350,9 +350,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/Makefile + $(AUTOMAKE) --foreign contrib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/contrib/rddmarc/Makefile.in opendmarc-1.3.2/contrib/rddmarc/Makefile.in --- opendmarc-1.3.2~Beta1/contrib/rddmarc/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/contrib/rddmarc/Makefile.in 2017-03-04 08:28:57.000000000 -0500 @@ -294,9 +294,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/rddmarc/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/rddmarc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/rddmarc/Makefile + $(AUTOMAKE) --foreign contrib/rddmarc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/db/Makefile.in opendmarc-1.3.2/db/Makefile.in --- opendmarc-1.3.2~Beta1/db/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/db/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -289,9 +289,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu db/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign db/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu db/Makefile + $(AUTOMAKE) --foreign db/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/debian/changelog opendmarc-1.3.2/debian/changelog --- opendmarc-1.3.2~Beta1/debian/changelog 2017-03-13 21:45:23.000000000 -0400 +++ opendmarc-1.3.2/debian/changelog 2017-03-13 21:45:24.000000000 -0400 @@ -1,3 +1,19 @@ +opendmarc (1.3.2-1) unstable; urgency=medium + + * New upstream release + - Update debian/copyright (added 2017) + - Remove patches applied upstrea (debian/patches/ticket095.patch, + ticket165_incomplete.patch, ticket166.patch, ticket185.patch, and + ticket187.patch) + * Update README.Debian to point to use of opendmarc.service.d/overrride.conf + with systemd (Closes: #856489, #856057) + * Update README.Debian to explain that TCP sockets bound to a specific IP + address will not work if that address is not bound to a network connection + and how to work avoid startup issues if network initialization is too slow + (Closes: #856488) + + -- Scott Kitterman <sc...@kitterman.com> Mon, 13 Mar 2017 21:44:33 -0400 + opendmarc (1.3.2~Beta1-2) unstable; urgency=medium * Add debian/patches/ticket193.patch to fix compatibility with mysql strict diff -Nru opendmarc-1.3.2~Beta1/debian/copyright opendmarc-1.3.2/debian/copyright --- opendmarc-1.3.2~Beta1/debian/copyright 2017-03-13 21:45:23.000000000 -0400 +++ opendmarc-1.3.2/debian/copyright 2017-03-13 21:45:24.000000000 -0400 @@ -8,7 +8,8 @@ Based on code from DKIM Milter, copyright Sendmail Inc. Copyright: -Copyright (c) 2009, 2010, 2012, 2013, 2014, 2015, 2016 The Trusted Domain Project. +Copyright (c) 2009, 2010, 2012, 2013, 2014, 2015, 2016, 2017 The Trusted + Domain Project. All rights reserved. Redistribution and use in source and binary forms, with or without diff -Nru opendmarc-1.3.2~Beta1/debian/patches/series opendmarc-1.3.2/debian/patches/series --- opendmarc-1.3.2~Beta1/debian/patches/series 2017-03-13 21:45:23.000000000 -0400 +++ opendmarc-1.3.2/debian/patches/series 2017-03-13 21:45:24.000000000 -0400 @@ -1,11 +1,6 @@ fix-python-interpreter.diff -ticket095.patch ticket153.patch -ticket165_incomplete.patch -ticket166.patch ticket168.patch ticket174.patch -ticket185.patch -ticket187.patch ticket193.patch ticket159.patch diff -Nru opendmarc-1.3.2~Beta1/debian/patches/ticket095.patch opendmarc-1.3.2/debian/patches/ticket095.patch --- opendmarc-1.3.2~Beta1/debian/patches/ticket095.patch 2017-03-13 21:45:23.000000000 -0400 +++ opendmarc-1.3.2/debian/patches/ticket095.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,17 +0,0 @@ -Description: Try to fix Ticket #95 -URL: https://sf.net/p/opendmarc/tickets/95/ -Author: A. Schulze ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -Index: opendmarc-1.3.1/libopendmarc/opendmarc_spf.c -=================================================================== ---- opendmarc-1.3.1.orig/libopendmarc/opendmarc_spf.c -+++ opendmarc-1.3.1/libopendmarc/opendmarc_spf.c -@@ -113,6 +113,7 @@ opendmarc_spf2_specify_ip_address(SPF_CT - * we don't care at this point if it is ipv6 or ipv4 - */ - SPF_request_set_ipv4_str(spfctx->spf_request, ip_address); -+ SPF_request_set_ipv6_str(spfctx->spf_request, ip_address); - return 0; - } - diff -Nru opendmarc-1.3.2~Beta1/debian/patches/ticket153.patch opendmarc-1.3.2/debian/patches/ticket153.patch --- opendmarc-1.3.2~Beta1/debian/patches/ticket153.patch 2017-03-13 21:45:23.000000000 -0400 +++ opendmarc-1.3.2/debian/patches/ticket153.patch 2017-03-13 21:45:24.000000000 -0400 @@ -4,11 +4,11 @@ Author: Tomki --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -Index: opendmarc-1.3.2~Beta0+dfsg/reports/opendmarc-reports.in +Index: opendmarc-1.3.2/reports/opendmarc-reports.in =================================================================== ---- opendmarc-1.3.2~Beta0+dfsg.orig/reports/opendmarc-reports.in 2016-07-20 01:27:56.868740230 -0400 -+++ opendmarc-1.3.2~Beta0+dfsg/reports/opendmarc-reports.in 2016-07-20 01:27:56.864740230 -0400 -@@ -718,6 +718,7 @@ +--- opendmarc-1.3.2.orig/reports/opendmarc-reports.in 2017-03-13 19:01:56.496961757 -0400 ++++ opendmarc-1.3.2/reports/opendmarc-reports.in 2017-03-13 19:01:56.492961756 -0400 +@@ -703,6 +703,7 @@ exit(1); } @@ -16,7 +16,7 @@ while ($dbi_a = $dbi_d->fetchrow_arrayref()) { undef $dkimdomain; -@@ -731,11 +732,15 @@ +@@ -716,11 +717,15 @@ $dkimresult = $dbi_a->[1]; } diff -Nru opendmarc-1.3.2~Beta1/debian/patches/ticket165_incomplete.patch opendmarc-1.3.2/debian/patches/ticket165_incomplete.patch --- opendmarc-1.3.2~Beta1/debian/patches/ticket165_incomplete.patch 2017-03-13 21:45:23.000000000 -0400 +++ opendmarc-1.3.2/debian/patches/ticket165_incomplete.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,13 +0,0 @@ -Index: opendmarc-1.3.2~Beta0+dfsg/libopendmarc/opendmarc_spf.c -=================================================================== ---- opendmarc-1.3.2~Beta0+dfsg.orig/libopendmarc/opendmarc_spf.c 2016-12-03 20:54:36.094829217 -0500 -+++ opendmarc-1.3.2~Beta0+dfsg/libopendmarc/opendmarc_spf.c 2016-12-03 20:54:36.090829217 -0500 -@@ -164,7 +164,7 @@ - } - - ret = opendmarc_spf2_find_mailfrom_domain(ctx, mail_from_domain, mfrom, sizeof mfrom, used_mfrom); -- if (ret |= 0 || *used_mfrom == FALSE) -+ if (ret != 0 || *used_mfrom == FALSE) - { - (void) strlcpy(helo, helo_domain, sizeof helo); - SPF_request_set_helo_dom(ctx->spf_request, helo); diff -Nru opendmarc-1.3.2~Beta1/debian/patches/ticket166.patch opendmarc-1.3.2/debian/patches/ticket166.patch --- opendmarc-1.3.2~Beta1/debian/patches/ticket166.patch 2017-03-13 21:45:23.000000000 -0400 +++ opendmarc-1.3.2/debian/patches/ticket166.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,136 +0,0 @@ -Index: opendmarc-1.3.2~Beta1/reports/opendmarc-reports.in -=================================================================== ---- opendmarc-1.3.2~Beta1.orig/reports/opendmarc-reports.in 2017-01-07 00:27:16.779326748 -0500 -+++ opendmarc-1.3.2~Beta1/reports/opendmarc-reports.in 2017-01-07 00:27:16.775326748 -0500 -@@ -23,6 +23,7 @@ - use POSIX; - use MIME::Base64; - use Net::SMTP; -+use Time::Local; - - require DBD::@SQL_BACKEND@; - -@@ -52,7 +53,7 @@ - - my $zipin; - --my $now; -+my $now = time(); - - my $repstart; - my $repend; -@@ -276,7 +277,12 @@ - } - } - --if (!defined($interval)) -+if (defined($interval) && $daybound) -+{ -+ print STDERR "$progname: WARN: --day overrides --interval\n"; -+} -+ -+if (!defined($interval) || $daybound) - { - $interval = $def_interval; - } -@@ -287,7 +293,7 @@ - - if ($verbose) - { -- print STDERR "$progname: started at " . localtime() . "\n"; -+ print STDERR "$progname: started at " . localtime($now) . "\n"; - } - - my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname . -@@ -322,8 +328,6 @@ - # Select domains on which to report - # - --$now = time(); -- - if ($verbose >= 2) - { - print STDERR "$progname: selecting target domains\n"; -@@ -491,9 +495,22 @@ - next; - } - -+ if ($daybound) -+ { -+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now - $interval); -+ $repstart = timelocal(0, 0, 0, $mday, $mon, $year); -+ ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now); -+ $repend = timelocal(0, 0, 0, $mday, $mon, $year); -+ } -+ else -+ { -+ $repstart = $now - $interval; -+ $repend = $now; -+ } -+ - # construct the temporary file -- $repfile = $repdom . "!" . $domain . "!" . $lastsent . "!" . time() . ".xml"; -- $zipfile = $repdom . "!" . $domain . "!" . $lastsent . "!" . time() . ".zip"; -+ $repfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".xml"; -+ $zipfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".zip"; - if (!open($tmpout, ">", $repfile)) - { - print STDERR "$progname: can't create report file for domain $domain\n"; -@@ -531,39 +548,6 @@ - else { $spolicystr = "unknown"; } - } - -- if ($daybound) -- { -- $dbi_s = $dbi_h->prepare("SELECT UNIX_TIMESTAMP(MIN(date)), UNIX_TIMESTAMP(MAX(date)) FROM messages WHERE from_domain = ? AND DATE(date) >= DATE(FROM_UNIXTIME(?)) AND DATE(date) < DATE(FROM_UNIXTIME(?))"); -- } -- else -- { -- $dbi_s = $dbi_h->prepare("SELECT UNIX_TIMESTAMP(MIN(date)), UNIX_TIMESTAMP(MAX(date)) FROM messages WHERE from_domain = ? AND UNIX_TIMESTAMP(date) > ? AND UNIX_TIMESTAMP(date) <= ?"); -- } -- -- if (!$dbi_s->execute($domainid, $lastsent, $now)) -- { -- print STDERR "$progname: can't extract begin/end times for domain $domain: " . $dbi_h->errstr . "\n"; -- $dbi_s->finish; -- $dbi_h->disconnect; -- exit(1); -- } -- -- $repstart = 0; -- $repend = $now; -- -- while ($dbi_a = $dbi_s->fetchrow_arrayref()) -- { -- if (defined($dbi_a->[0])) -- { -- $repstart = $dbi_a->[0]; -- } -- if (defined($dbi_a->[1])) -- { -- $repend = $dbi_a->[1]; -- } -- } -- -- $dbi_s->finish; - - print $tmpout "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; - print $tmpout "<feedback>\n"; -@@ -596,7 +580,7 @@ - $dbi_s = $dbi_h->prepare("SELECT messages.id, ipaddr.addr, messages.disp, d1.name, d2.name, messages.spf, messages.align_spf, messages.align_dkim FROM messages JOIN ipaddr ON messages.ip = ipaddr.id JOIN domains d1 ON messages.from_domain = d1.id JOIN domains d2 ON messages.env_domain = d2.id WHERE messages.from_domain = ? AND messages.date > FROM_UNIXTIME(?) AND messages.date <= FROM_UNIXTIME(?)"); - } - -- if (!$dbi_s->execute($domainid, $lastsent, $now)) -+ if (!$dbi_s->execute($domainid, $repstart, $repend)) - { - print STDERR "$progname: can't extract report for domain $domain: " . $dbi_h->errstr . "\n"; - $dbi_s->finish; -@@ -952,7 +936,7 @@ - if ($doupdate) - { - $dbi_s = $dbi_h->prepare("UPDATE requests SET lastsent = FROM_UNIXTIME(?) WHERE domain = ?"); -- if (!$dbi_s->execute($now, $domainid)) -+ if (!$dbi_s->execute($repend, $domainid)) - { - print STDERR "$progname: can't update last sent time for domain $domain: " . $dbi_h->errstr . "\n"; - $dbi_s->finish; diff -Nru opendmarc-1.3.2~Beta1/debian/patches/ticket185.patch opendmarc-1.3.2/debian/patches/ticket185.patch --- opendmarc-1.3.2~Beta1/debian/patches/ticket185.patch 2017-03-13 21:45:23.000000000 -0400 +++ opendmarc-1.3.2/debian/patches/ticket185.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,13 +0,0 @@ -Index: opendmarc-1.3.2~Beta1/opendmarc/opendmarc.c -=================================================================== ---- opendmarc-1.3.2~Beta1.orig/opendmarc/opendmarc.c 2017-01-07 00:31:02.863332555 -0500 -+++ opendmarc-1.3.2~Beta1/opendmarc/opendmarc.c 2017-01-07 00:31:02.859332555 -0500 -@@ -1723,7 +1723,7 @@ - if (dmarcf_checkhost(host, ignore) || - (ip != NULL && dmarcf_checkip(ip, ignore))) - { -- if (conf->conf_dolog) -+ if (curconf->conf_dolog) - syslog(LOG_INFO, "ignoring connection from %s", host); - return SMFIS_ACCEPT; - } diff -Nru opendmarc-1.3.2~Beta1/debian/patches/ticket187.patch opendmarc-1.3.2/debian/patches/ticket187.patch --- opendmarc-1.3.2~Beta1/debian/patches/ticket187.patch 2017-03-13 21:45:23.000000000 -0400 +++ opendmarc-1.3.2/debian/patches/ticket187.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,15 +0,0 @@ -Index: opendmarc-1.3.2~Beta1/opendmarc/opendmarc.c -=================================================================== ---- opendmarc-1.3.2~Beta1.orig/opendmarc/opendmarc.c 2017-01-07 00:32:01.983334074 -0500 -+++ opendmarc-1.3.2~Beta1/opendmarc/opendmarc.c 2017-01-07 00:32:01.979334074 -0500 -@@ -2653,8 +2653,8 @@ - { - char *mode; - -- if (mode == DMARC_POLICY_SPF_ORIGIN_HELO) -- mode = "helo: -+ if (spf_mode == DMARC_POLICY_SPF_ORIGIN_HELO) -+ mode = "helo"; - else - mode = "mailfrom"; - diff -Nru opendmarc-1.3.2~Beta1/debian/README.Debian opendmarc-1.3.2/debian/README.Debian --- opendmarc-1.3.2~Beta1/debian/README.Debian 2017-03-13 21:45:23.000000000 -0400 +++ opendmarc-1.3.2/debian/README.Debian 2017-03-13 21:45:24.000000000 -0400 @@ -33,11 +33,20 @@ Users may also need to move the socket into a directory accessible by the Postfix chroot; this can be accomplished by setting the SOCKET variable -in /etc/default/opendmarc. +in /etc/systemd/system/opendmarc.service.d/overrride.conf (if systemd is used) +or in /etc/default/opendmarc (if SysV is used). Alternately, it can be set in +the installed configuration file, /etc/opendmarc.conf. -The default is to connect to the filter over TCP. The filter can be bound to -localhost to prevent other hosts from accessing it. For example, to bind to -port 8892, specify "inet:8892@localhost". +If opendmarc fails to start during boot, add After=network-online.target to +/etc/systemd/system/opendmarc.service.d/overrride.conf (if systemd is used) to +ensure the network is fully initialized before opendkim is started. This is +not likely to be an issue with SysV. + +The default is to connect to the filter over a Unix socket. It can also use +TCP sockets. The filter can be bound to localhost to prevent other hosts from +accessing it. For example, to bind to port 8892, specify +"inet:8892@localhost". In order to use a TCP socket for a specific IP +address, that address has to be bound to an active network connection. Changing group ownership of socket ---------------------------------- diff -Nru opendmarc-1.3.2~Beta1/docs/Makefile.in opendmarc-1.3.2/docs/Makefile.in --- opendmarc-1.3.2~Beta1/docs/Makefile.in 2016-12-18 04:56:17.000000000 -0500 +++ opendmarc-1.3.2/docs/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -82,7 +82,7 @@ host_triplet = @host@ subdir = docs DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(dist_doc_DATA) README + $(dist_doc_DATA) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -289,9 +289,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/Makefile + $(AUTOMAKE) --foreign docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/docs/README opendmarc-1.3.2/docs/README --- opendmarc-1.3.2~Beta1/docs/README 2014-03-15 02:25:34.000000000 -0400 +++ opendmarc-1.3.2/docs/README 1969-12-31 19:00:00.000000000 -0500 @@ -1,2 +0,0 @@ -This directory includes the text version of the DMARC specification most -recently released for public use by the DMARC.org organization. diff -Nru opendmarc-1.3.2~Beta1/libopendmarc/docs/Makefile.in opendmarc-1.3.2/libopendmarc/docs/Makefile.in --- opendmarc-1.3.2~Beta1/libopendmarc/docs/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/libopendmarc/docs/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -325,9 +325,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libopendmarc/docs/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libopendmarc/docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu libopendmarc/docs/Makefile + $(AUTOMAKE) --foreign libopendmarc/docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/libopendmarc/Makefile.in opendmarc-1.3.2/libopendmarc/Makefile.in --- opendmarc-1.3.2~Beta1/libopendmarc/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/libopendmarc/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -407,9 +407,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libopendmarc/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libopendmarc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu libopendmarc/Makefile + $(AUTOMAKE) --foreign libopendmarc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/libopendmarc/opendmarc_spf.c opendmarc-1.3.2/libopendmarc/opendmarc_spf.c --- opendmarc-1.3.2~Beta1/libopendmarc/opendmarc_spf.c 2016-07-19 09:32:21.000000000 -0400 +++ opendmarc-1.3.2/libopendmarc/opendmarc_spf.c 2017-03-04 08:28:39.000000000 -0500 @@ -113,6 +113,7 @@ * we don't care at this point if it is ipv6 or ipv4 */ SPF_request_set_ipv4_str(spfctx->spf_request, ip_address); + SPF_request_set_ipv6_str(spfctx->spf_request, ip_address); return 0; } @@ -163,7 +164,7 @@ } ret = opendmarc_spf2_find_mailfrom_domain(ctx, mail_from_domain, mfrom, sizeof mfrom, used_mfrom); - if (ret |= 0 || *used_mfrom == FALSE) + if (ret != 0 || *used_mfrom == FALSE) { (void) strlcpy(helo, helo_domain, sizeof helo); SPF_request_set_helo_dom(ctx->spf_request, helo); diff -Nru opendmarc-1.3.2~Beta1/libopendmarc/tests/Makefile.in opendmarc-1.3.2/libopendmarc/tests/Makefile.in --- opendmarc-1.3.2~Beta1/libopendmarc/tests/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/libopendmarc/tests/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -616,9 +616,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libopendmarc/tests/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libopendmarc/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu libopendmarc/tests/Makefile + $(AUTOMAKE) --foreign libopendmarc/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/opendmarc/Makefile.in opendmarc-1.3.2/opendmarc/Makefile.in --- opendmarc-1.3.2~Beta1/opendmarc/Makefile.in 2016-12-18 04:49:47.000000000 -0500 +++ opendmarc-1.3.2/opendmarc/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -421,9 +421,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu opendmarc/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign opendmarc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu opendmarc/Makefile + $(AUTOMAKE) --foreign opendmarc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/opendmarc/opendmarc.c opendmarc-1.3.2/opendmarc/opendmarc.c --- opendmarc-1.3.2~Beta1/opendmarc/opendmarc.c 2016-12-18 04:59:31.000000000 -0500 +++ opendmarc-1.3.2/opendmarc/opendmarc.c 2017-03-04 08:28:39.000000000 -0500 @@ -1,5 +1,5 @@ /* -** Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved. +** Copyright (c) 2012-2017, The Trusted Domain Project. All rights reserved. */ #include "build-config.h" @@ -1691,7 +1691,7 @@ if (dmarcf_checkhost(host, ignore) || (ip != NULL && dmarcf_checkip(ip, ignore))) { - if (conf->conf_dolog) + if (curconf->conf_dolog) syslog(LOG_INFO, "ignoring connection from %s", host); return SMFIS_ACCEPT; } @@ -2621,8 +2621,8 @@ { char *mode; - if (mode == DMARC_POLICY_SPF_ORIGIN_HELO) - mode = "helo: + if (spf_mode == DMARC_POLICY_SPF_ORIGIN_HELO) + mode = "helo"; else mode = "mailfrom"; diff -Nru opendmarc-1.3.2~Beta1/opendmarc/tests/Makefile.in opendmarc-1.3.2/opendmarc/tests/Makefile.in --- opendmarc-1.3.2~Beta1/opendmarc/tests/Makefile.in 2016-12-18 04:49:47.000000000 -0500 +++ opendmarc-1.3.2/opendmarc/tests/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -473,9 +473,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu opendmarc/tests/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign opendmarc/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu opendmarc/tests/Makefile + $(AUTOMAKE) --foreign opendmarc/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -Nru opendmarc-1.3.2~Beta1/RELEASE_NOTES opendmarc-1.3.2/RELEASE_NOTES --- opendmarc-1.3.2~Beta1/RELEASE_NOTES 2016-12-18 05:00:08.000000000 -0500 +++ opendmarc-1.3.2/RELEASE_NOTES 2017-03-04 08:29:13.000000000 -0500 @@ -17,6 +17,7 @@ Feature request #139: Include the client host name if known in failure reports. Suggested by Roland Turner; patch by Andreas Schulze. + Fix bug #95: Assume IPv6 for SPF operations. Patch from Juri Haberland. Fix bug #120: Fix control logic around the SPF result. Reported by Christophe Wolfhugel; patch from Andreas Schulze. Fix bug #122: Don't skip the HELO milter phase when SPF is enabled. @@ -49,7 +50,8 @@ LIBOPENDMARC: Fix bug #156: Fix variable name. Patch by Andreas Schulze. LIBOPENDMARC: Fix bug #165: Fix logic in checking which SPF - identifier was used. Patch from Marco Favero. + identifier was used. Patches from Marco Favero and + Juri Haberland. LIBOPENDMARC: Fix bug #167: Don't return "fail" when we should return "none". Patch from Marco Favero. REPORTS: Fix bug #134: Handle SMTP errors correctly. Patch from @@ -60,6 +62,8 @@ Reported by Wayne Andersen; patch from Juri Haberland. REPORTS: Fix bug #162: Always report "sp" in aggregate reports. Patch from Juri Haberland. + REPORTS: Fix bug #166: Fix report start/end time logic. + Patch from Juri Haberland. REPORTS: Fix bug #188: Don't delete inputs too early in opendmarc-reports. Patch from Juri Haberland. TOOLS: Fix bug #161: "Forensic" reports were renamed "Failure" diff -Nru opendmarc-1.3.2~Beta1/reports/opendmarc-reports opendmarc-1.3.2/reports/opendmarc-reports --- opendmarc-1.3.2~Beta1/reports/opendmarc-reports 2016-12-18 04:58:47.000000000 -0500 +++ opendmarc-1.3.2/reports/opendmarc-reports 2017-03-04 08:29:11.000000000 -0500 @@ -1,6 +1,7 @@ #!/usr/bin/perl # -# Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved. +# Copyright (c) 2012-2016, 2017, The Trusted Domain Project. +# All rights reserved. # # Script to generate regular DMARC reports. @@ -23,6 +24,7 @@ use POSIX; use MIME::Base64; use Net::SMTP; +use Time::Local; require DBD::mysql; @@ -52,7 +54,7 @@ my $zipin; -my $now; +my $now = time(); my $repstart; my $repend; @@ -276,7 +278,12 @@ } } -if (!defined($interval)) +if (defined($interval) && $daybound) +{ + print STDERR "$progname: WARN: --day overrides --interval\n"; +} + +if (!defined($interval) || $daybound) { $interval = $def_interval; } @@ -287,7 +294,7 @@ if ($verbose) { - print STDERR "$progname: started at " . localtime() . "\n"; + print STDERR "$progname: started at " . localtime($now) . "\n"; } my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname . @@ -322,8 +329,6 @@ # Select domains on which to report # -$now = time(); - if ($verbose >= 2) { print STDERR "$progname: selecting target domains\n"; @@ -491,9 +496,22 @@ next; } + if ($daybound) + { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now - $interval); + $repstart = timelocal(0, 0, 0, $mday, $mon, $year); + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now); + $repend = timelocal(0, 0, 0, $mday, $mon, $year); + } + else + { + $repstart = $now - $interval; + $repend = $now; + } + # construct the temporary file - $repfile = $repdom . "!" . $domain . "!" . $lastsent . "!" . time() . ".xml"; - $zipfile = $repdom . "!" . $domain . "!" . $lastsent . "!" . time() . ".zip"; + $repfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".xml"; + $zipfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".zip"; if (!open($tmpout, ">", $repfile)) { print STDERR "$progname: can't create report file for domain $domain\n"; @@ -531,39 +549,6 @@ else { $spolicystr = "unknown"; } } - if ($daybound) - { - $dbi_s = $dbi_h->prepare("SELECT UNIX_TIMESTAMP(MIN(date)), UNIX_TIMESTAMP(MAX(date)) FROM messages WHERE from_domain = ? AND DATE(date) >= DATE(FROM_UNIXTIME(?)) AND DATE(date) < DATE(FROM_UNIXTIME(?))"); - } - else - { - $dbi_s = $dbi_h->prepare("SELECT UNIX_TIMESTAMP(MIN(date)), UNIX_TIMESTAMP(MAX(date)) FROM messages WHERE from_domain = ? AND UNIX_TIMESTAMP(date) > ? AND UNIX_TIMESTAMP(date) <= ?"); - } - - if (!$dbi_s->execute($domainid, $lastsent, $now)) - { - print STDERR "$progname: can't extract begin/end times for domain $domain: " . $dbi_h->errstr . "\n"; - $dbi_s->finish; - $dbi_h->disconnect; - exit(1); - } - - $repstart = 0; - $repend = $now; - - while ($dbi_a = $dbi_s->fetchrow_arrayref()) - { - if (defined($dbi_a->[0])) - { - $repstart = $dbi_a->[0]; - } - if (defined($dbi_a->[1])) - { - $repend = $dbi_a->[1]; - } - } - - $dbi_s->finish; print $tmpout "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; print $tmpout "<feedback>\n"; @@ -596,7 +581,7 @@ $dbi_s = $dbi_h->prepare("SELECT messages.id, ipaddr.addr, messages.disp, d1.name, d2.name, messages.spf, messages.align_spf, messages.align_dkim FROM messages JOIN ipaddr ON messages.ip = ipaddr.id JOIN domains d1 ON messages.from_domain = d1.id JOIN domains d2 ON messages.env_domain = d2.id WHERE messages.from_domain = ? AND messages.date > FROM_UNIXTIME(?) AND messages.date <= FROM_UNIXTIME(?)"); } - if (!$dbi_s->execute($domainid, $lastsent, $now)) + if (!$dbi_s->execute($domainid, $repstart, $repend)) { print STDERR "$progname: can't extract report for domain $domain: " . $dbi_h->errstr . "\n"; $dbi_s->finish; @@ -947,7 +932,7 @@ if ($doupdate) { $dbi_s = $dbi_h->prepare("UPDATE requests SET lastsent = FROM_UNIXTIME(?) WHERE domain = ?"); - if (!$dbi_s->execute($now, $domainid)) + if (!$dbi_s->execute($repend, $domainid)) { print STDERR "$progname: can't update last sent time for domain $domain: " . $dbi_h->errstr . "\n"; $dbi_s->finish; diff -Nru opendmarc-1.3.2~Beta1/reports/opendmarc-reports.in opendmarc-1.3.2/reports/opendmarc-reports.in --- opendmarc-1.3.2~Beta1/reports/opendmarc-reports.in 2016-12-18 03:45:26.000000000 -0500 +++ opendmarc-1.3.2/reports/opendmarc-reports.in 2017-03-04 08:28:39.000000000 -0500 @@ -1,6 +1,7 @@ #!/usr/bin/perl # -# Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved. +# Copyright (c) 2012-2016, 2017, The Trusted Domain Project. +# All rights reserved. # # Script to generate regular DMARC reports. @@ -23,6 +24,7 @@ use POSIX; use MIME::Base64; use Net::SMTP; +use Time::Local; require DBD::@SQL_BACKEND@; @@ -52,7 +54,7 @@ my $zipin; -my $now; +my $now = time(); my $repstart; my $repend; @@ -276,7 +278,12 @@ } } -if (!defined($interval)) +if (defined($interval) && $daybound) +{ + print STDERR "$progname: WARN: --day overrides --interval\n"; +} + +if (!defined($interval) || $daybound) { $interval = $def_interval; } @@ -287,7 +294,7 @@ if ($verbose) { - print STDERR "$progname: started at " . localtime() . "\n"; + print STDERR "$progname: started at " . localtime($now) . "\n"; } my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname . @@ -322,8 +329,6 @@ # Select domains on which to report # -$now = time(); - if ($verbose >= 2) { print STDERR "$progname: selecting target domains\n"; @@ -491,9 +496,22 @@ next; } + if ($daybound) + { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now - $interval); + $repstart = timelocal(0, 0, 0, $mday, $mon, $year); + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now); + $repend = timelocal(0, 0, 0, $mday, $mon, $year); + } + else + { + $repstart = $now - $interval; + $repend = $now; + } + # construct the temporary file - $repfile = $repdom . "!" . $domain . "!" . $lastsent . "!" . time() . ".xml"; - $zipfile = $repdom . "!" . $domain . "!" . $lastsent . "!" . time() . ".zip"; + $repfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".xml"; + $zipfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".zip"; if (!open($tmpout, ">", $repfile)) { print STDERR "$progname: can't create report file for domain $domain\n"; @@ -531,39 +549,6 @@ else { $spolicystr = "unknown"; } } - if ($daybound) - { - $dbi_s = $dbi_h->prepare("SELECT UNIX_TIMESTAMP(MIN(date)), UNIX_TIMESTAMP(MAX(date)) FROM messages WHERE from_domain = ? AND DATE(date) >= DATE(FROM_UNIXTIME(?)) AND DATE(date) < DATE(FROM_UNIXTIME(?))"); - } - else - { - $dbi_s = $dbi_h->prepare("SELECT UNIX_TIMESTAMP(MIN(date)), UNIX_TIMESTAMP(MAX(date)) FROM messages WHERE from_domain = ? AND UNIX_TIMESTAMP(date) > ? AND UNIX_TIMESTAMP(date) <= ?"); - } - - if (!$dbi_s->execute($domainid, $lastsent, $now)) - { - print STDERR "$progname: can't extract begin/end times for domain $domain: " . $dbi_h->errstr . "\n"; - $dbi_s->finish; - $dbi_h->disconnect; - exit(1); - } - - $repstart = 0; - $repend = $now; - - while ($dbi_a = $dbi_s->fetchrow_arrayref()) - { - if (defined($dbi_a->[0])) - { - $repstart = $dbi_a->[0]; - } - if (defined($dbi_a->[1])) - { - $repend = $dbi_a->[1]; - } - } - - $dbi_s->finish; print $tmpout "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; print $tmpout "<feedback>\n"; @@ -596,7 +581,7 @@ $dbi_s = $dbi_h->prepare("SELECT messages.id, ipaddr.addr, messages.disp, d1.name, d2.name, messages.spf, messages.align_spf, messages.align_dkim FROM messages JOIN ipaddr ON messages.ip = ipaddr.id JOIN domains d1 ON messages.from_domain = d1.id JOIN domains d2 ON messages.env_domain = d2.id WHERE messages.from_domain = ? AND messages.date > FROM_UNIXTIME(?) AND messages.date <= FROM_UNIXTIME(?)"); } - if (!$dbi_s->execute($domainid, $lastsent, $now)) + if (!$dbi_s->execute($domainid, $repstart, $repend)) { print STDERR "$progname: can't extract report for domain $domain: " . $dbi_h->errstr . "\n"; $dbi_s->finish; @@ -947,7 +932,7 @@ if ($doupdate) { $dbi_s = $dbi_h->prepare("UPDATE requests SET lastsent = FROM_UNIXTIME(?) WHERE domain = ?"); - if (!$dbi_s->execute($now, $domainid)) + if (!$dbi_s->execute($repend, $domainid)) { print STDERR "$progname: can't update last sent time for domain $domain: " . $dbi_h->errstr . "\n"; $dbi_s->finish; diff -Nru opendmarc-1.3.2~Beta1/reports/README opendmarc-1.3.2/reports/README --- opendmarc-1.3.2~Beta1/reports/README 2016-12-18 04:49:12.000000000 -0500 +++ opendmarc-1.3.2/reports/README 2017-03-04 08:28:39.000000000 -0500 @@ -36,7 +36,7 @@ SETUP ===== -1) From within the MySQL command line environment, "source mkdb.mysql" to +1) From within the MySQL command line environment, "source schema.mysql" to create the required database and tables. You may also wish to set up users and access grants for users that will access this data. @@ -54,5 +54,5 @@ XML reports based on recent database entries. -- -Copyright (c) 2012-2014, 2016, The Trusted Domain Project. +Copyright (c) 2012-2014, 2016, 2017, The Trusted Domain Project. All rights reserved.
diff -ruN opendmarc-1.3.2~Beta1/configure opendmarc-1.3.2/configure --- opendmarc-1.3.2~Beta1/configure 2016-12-18 04:49:44.000000000 -0500 +++ opendmarc-1.3.2/configure 2017-03-04 08:28:59.000000000 -0500 @@ -3074,7 +3074,7 @@ # # library version, passed to libtool # -LIBOPENDMARC_VERSION_INFO=$(printf %d:%d:%d 2 1 0) +LIBOPENDMARC_VERSION_INFO=$(printf %d:%d:%d 2 2 0) # diff -ruN opendmarc-1.3.2~Beta1/configure.ac opendmarc-1.3.2/configure.ac --- opendmarc-1.3.2~Beta1/configure.ac 2017-03-13 19:04:34.068968493 -0400 +++ opendmarc-1.3.2/configure.ac 2017-03-13 19:04:09.016967422 -0400 @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # -# Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved. +# Copyright (c) 2012-2017, The Trusted Domain Project. All rights reserved. # Acceptable arguments to configure are: # The usual CC= etc. @@ -33,7 +33,7 @@ # m4_define([LIBVERSION_CURRENT], 2) -m4_define([LIBVERSION_REVISION], 1) +m4_define([LIBVERSION_REVISION], 2) m4_define([LIBVERSION_AGE], 0) # diff -ruN opendmarc-1.3.2~Beta1/contrib/init/generic/Makefile.in opendmarc-1.3.2/contrib/init/generic/Makefile.in --- opendmarc-1.3.2~Beta1/contrib/init/generic/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/contrib/init/generic/Makefile.in 2017-03-04 08:28:57.000000000 -0500 @@ -289,9 +289,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/init/generic/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/init/generic/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/init/generic/Makefile + $(AUTOMAKE) --foreign contrib/init/generic/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/contrib/init/redhat/Makefile.in opendmarc-1.3.2/contrib/init/redhat/Makefile.in --- opendmarc-1.3.2~Beta1/contrib/init/redhat/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/contrib/init/redhat/Makefile.in 2017-03-04 08:28:57.000000000 -0500 @@ -289,9 +289,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/init/redhat/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/init/redhat/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/init/redhat/Makefile + $(AUTOMAKE) --foreign contrib/init/redhat/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/contrib/Makefile.in opendmarc-1.3.2/contrib/Makefile.in --- opendmarc-1.3.2~Beta1/contrib/Makefile.in 2016-12-18 04:49:45.000000000 -0500 +++ opendmarc-1.3.2/contrib/Makefile.in 2017-03-04 08:28:57.000000000 -0500 @@ -350,9 +350,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/Makefile + $(AUTOMAKE) --foreign contrib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/contrib/rddmarc/Makefile.in opendmarc-1.3.2/contrib/rddmarc/Makefile.in --- opendmarc-1.3.2~Beta1/contrib/rddmarc/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/contrib/rddmarc/Makefile.in 2017-03-04 08:28:57.000000000 -0500 @@ -294,9 +294,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/rddmarc/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/rddmarc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu contrib/rddmarc/Makefile + $(AUTOMAKE) --foreign contrib/rddmarc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/db/Makefile.in opendmarc-1.3.2/db/Makefile.in --- opendmarc-1.3.2~Beta1/db/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/db/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -289,9 +289,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu db/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign db/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu db/Makefile + $(AUTOMAKE) --foreign db/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/docs/Makefile.in opendmarc-1.3.2/docs/Makefile.in --- opendmarc-1.3.2~Beta1/docs/Makefile.in 2016-12-18 04:56:17.000000000 -0500 +++ opendmarc-1.3.2/docs/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -82,7 +82,7 @@ host_triplet = @host@ subdir = docs DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(dist_doc_DATA) README + $(dist_doc_DATA) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pthread.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -289,9 +289,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/Makefile + $(AUTOMAKE) --foreign docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/docs/README opendmarc-1.3.2/docs/README --- opendmarc-1.3.2~Beta1/docs/README 2014-03-15 02:25:34.000000000 -0400 +++ opendmarc-1.3.2/docs/README 1969-12-31 19:00:00.000000000 -0500 @@ -1,2 +0,0 @@ -This directory includes the text version of the DMARC specification most -recently released for public use by the DMARC.org organization. diff -ruN opendmarc-1.3.2~Beta1/libopendmarc/docs/Makefile.in opendmarc-1.3.2/libopendmarc/docs/Makefile.in --- opendmarc-1.3.2~Beta1/libopendmarc/docs/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/libopendmarc/docs/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -325,9 +325,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libopendmarc/docs/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libopendmarc/docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu libopendmarc/docs/Makefile + $(AUTOMAKE) --foreign libopendmarc/docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/libopendmarc/Makefile.in opendmarc-1.3.2/libopendmarc/Makefile.in --- opendmarc-1.3.2~Beta1/libopendmarc/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/libopendmarc/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -407,9 +407,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libopendmarc/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libopendmarc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu libopendmarc/Makefile + $(AUTOMAKE) --foreign libopendmarc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/libopendmarc/tests/Makefile.in opendmarc-1.3.2/libopendmarc/tests/Makefile.in --- opendmarc-1.3.2~Beta1/libopendmarc/tests/Makefile.in 2016-12-18 04:49:46.000000000 -0500 +++ opendmarc-1.3.2/libopendmarc/tests/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -616,9 +616,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libopendmarc/tests/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libopendmarc/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu libopendmarc/tests/Makefile + $(AUTOMAKE) --foreign libopendmarc/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/opendmarc/Makefile.in opendmarc-1.3.2/opendmarc/Makefile.in --- opendmarc-1.3.2~Beta1/opendmarc/Makefile.in 2016-12-18 04:49:47.000000000 -0500 +++ opendmarc-1.3.2/opendmarc/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -421,9 +421,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu opendmarc/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign opendmarc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu opendmarc/Makefile + $(AUTOMAKE) --foreign opendmarc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/opendmarc/opendmarc.c opendmarc-1.3.2/opendmarc/opendmarc.c --- opendmarc-1.3.2~Beta1/opendmarc/opendmarc.c 2017-03-13 19:04:34.020968490 -0400 +++ opendmarc-1.3.2/opendmarc/opendmarc.c 2017-03-13 19:03:43.324966323 -0400 @@ -1,5 +1,5 @@ /* -** Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved. +** Copyright (c) 2012-2017, The Trusted Domain Project. All rights reserved. */ #include "build-config.h" diff -ruN opendmarc-1.3.2~Beta1/opendmarc/tests/Makefile.in opendmarc-1.3.2/opendmarc/tests/Makefile.in --- opendmarc-1.3.2~Beta1/opendmarc/tests/Makefile.in 2016-12-18 04:49:47.000000000 -0500 +++ opendmarc-1.3.2/opendmarc/tests/Makefile.in 2017-03-04 08:28:58.000000000 -0500 @@ -473,9 +473,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu opendmarc/tests/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign opendmarc/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu opendmarc/tests/Makefile + $(AUTOMAKE) --foreign opendmarc/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff -ruN opendmarc-1.3.2~Beta1/RELEASE_NOTES opendmarc-1.3.2/RELEASE_NOTES --- opendmarc-1.3.2~Beta1/RELEASE_NOTES 2016-12-18 05:00:08.000000000 -0500 +++ opendmarc-1.3.2/RELEASE_NOTES 2017-03-04 08:29:13.000000000 -0500 @@ -17,6 +17,7 @@ Feature request #139: Include the client host name if known in failure reports. Suggested by Roland Turner; patch by Andreas Schulze. + Fix bug #95: Assume IPv6 for SPF operations. Patch from Juri Haberland. Fix bug #120: Fix control logic around the SPF result. Reported by Christophe Wolfhugel; patch from Andreas Schulze. Fix bug #122: Don't skip the HELO milter phase when SPF is enabled. @@ -49,7 +50,8 @@ LIBOPENDMARC: Fix bug #156: Fix variable name. Patch by Andreas Schulze. LIBOPENDMARC: Fix bug #165: Fix logic in checking which SPF - identifier was used. Patch from Marco Favero. + identifier was used. Patches from Marco Favero and + Juri Haberland. LIBOPENDMARC: Fix bug #167: Don't return "fail" when we should return "none". Patch from Marco Favero. REPORTS: Fix bug #134: Handle SMTP errors correctly. Patch from @@ -60,6 +62,8 @@ Reported by Wayne Andersen; patch from Juri Haberland. REPORTS: Fix bug #162: Always report "sp" in aggregate reports. Patch from Juri Haberland. + REPORTS: Fix bug #166: Fix report start/end time logic. + Patch from Juri Haberland. REPORTS: Fix bug #188: Don't delete inputs too early in opendmarc-reports. Patch from Juri Haberland. TOOLS: Fix bug #161: "Forensic" reports were renamed "Failure" diff -ruN opendmarc-1.3.2~Beta1/reports/opendmarc-reports opendmarc-1.3.2/reports/opendmarc-reports --- opendmarc-1.3.2~Beta1/reports/opendmarc-reports 2016-12-18 04:58:47.000000000 -0500 +++ opendmarc-1.3.2/reports/opendmarc-reports 2017-03-04 08:29:11.000000000 -0500 @@ -1,6 +1,7 @@ #!/usr/bin/perl # -# Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved. +# Copyright (c) 2012-2016, 2017, The Trusted Domain Project. +# All rights reserved. # # Script to generate regular DMARC reports. @@ -23,6 +24,7 @@ use POSIX; use MIME::Base64; use Net::SMTP; +use Time::Local; require DBD::mysql; @@ -52,7 +54,7 @@ my $zipin; -my $now; +my $now = time(); my $repstart; my $repend; @@ -276,7 +278,12 @@ } } -if (!defined($interval)) +if (defined($interval) && $daybound) +{ + print STDERR "$progname: WARN: --day overrides --interval\n"; +} + +if (!defined($interval) || $daybound) { $interval = $def_interval; } @@ -287,7 +294,7 @@ if ($verbose) { - print STDERR "$progname: started at " . localtime() . "\n"; + print STDERR "$progname: started at " . localtime($now) . "\n"; } my $dbi_dsn = "DBI:" . $dbscheme . ":database=" . $dbname . @@ -322,8 +329,6 @@ # Select domains on which to report # -$now = time(); - if ($verbose >= 2) { print STDERR "$progname: selecting target domains\n"; @@ -491,9 +496,22 @@ next; } + if ($daybound) + { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now - $interval); + $repstart = timelocal(0, 0, 0, $mday, $mon, $year); + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($now); + $repend = timelocal(0, 0, 0, $mday, $mon, $year); + } + else + { + $repstart = $now - $interval; + $repend = $now; + } + # construct the temporary file - $repfile = $repdom . "!" . $domain . "!" . $lastsent . "!" . time() . ".xml"; - $zipfile = $repdom . "!" . $domain . "!" . $lastsent . "!" . time() . ".zip"; + $repfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".xml"; + $zipfile = $repdom . "!" . $domain . "!" . $repstart . "!" . $repend . ".zip"; if (!open($tmpout, ">", $repfile)) { print STDERR "$progname: can't create report file for domain $domain\n"; @@ -531,39 +549,6 @@ else { $spolicystr = "unknown"; } } - if ($daybound) - { - $dbi_s = $dbi_h->prepare("SELECT UNIX_TIMESTAMP(MIN(date)), UNIX_TIMESTAMP(MAX(date)) FROM messages WHERE from_domain = ? AND DATE(date) >= DATE(FROM_UNIXTIME(?)) AND DATE(date) < DATE(FROM_UNIXTIME(?))"); - } - else - { - $dbi_s = $dbi_h->prepare("SELECT UNIX_TIMESTAMP(MIN(date)), UNIX_TIMESTAMP(MAX(date)) FROM messages WHERE from_domain = ? AND UNIX_TIMESTAMP(date) > ? AND UNIX_TIMESTAMP(date) <= ?"); - } - - if (!$dbi_s->execute($domainid, $lastsent, $now)) - { - print STDERR "$progname: can't extract begin/end times for domain $domain: " . $dbi_h->errstr . "\n"; - $dbi_s->finish; - $dbi_h->disconnect; - exit(1); - } - - $repstart = 0; - $repend = $now; - - while ($dbi_a = $dbi_s->fetchrow_arrayref()) - { - if (defined($dbi_a->[0])) - { - $repstart = $dbi_a->[0]; - } - if (defined($dbi_a->[1])) - { - $repend = $dbi_a->[1]; - } - } - - $dbi_s->finish; print $tmpout "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; print $tmpout "<feedback>\n"; @@ -596,7 +581,7 @@ $dbi_s = $dbi_h->prepare("SELECT messages.id, ipaddr.addr, messages.disp, d1.name, d2.name, messages.spf, messages.align_spf, messages.align_dkim FROM messages JOIN ipaddr ON messages.ip = ipaddr.id JOIN domains d1 ON messages.from_domain = d1.id JOIN domains d2 ON messages.env_domain = d2.id WHERE messages.from_domain = ? AND messages.date > FROM_UNIXTIME(?) AND messages.date <= FROM_UNIXTIME(?)"); } - if (!$dbi_s->execute($domainid, $lastsent, $now)) + if (!$dbi_s->execute($domainid, $repstart, $repend)) { print STDERR "$progname: can't extract report for domain $domain: " . $dbi_h->errstr . "\n"; $dbi_s->finish; @@ -947,7 +932,7 @@ if ($doupdate) { $dbi_s = $dbi_h->prepare("UPDATE requests SET lastsent = FROM_UNIXTIME(?) WHERE domain = ?"); - if (!$dbi_s->execute($now, $domainid)) + if (!$dbi_s->execute($repend, $domainid)) { print STDERR "$progname: can't update last sent time for domain $domain: " . $dbi_h->errstr . "\n"; $dbi_s->finish; diff -ruN opendmarc-1.3.2~Beta1/reports/opendmarc-reports.in opendmarc-1.3.2/reports/opendmarc-reports.in --- opendmarc-1.3.2~Beta1/reports/opendmarc-reports.in 2017-03-13 19:04:33.928968487 -0400 +++ opendmarc-1.3.2/reports/opendmarc-reports.in 2017-03-13 19:02:48.896963997 -0400 @@ -1,6 +1,7 @@ #!/usr/bin/perl # -# Copyright (c) 2012-2016, The Trusted Domain Project. All rights reserved. +# Copyright (c) 2012-2016, 2017, The Trusted Domain Project. +# All rights reserved. # # Script to generate regular DMARC reports. diff -ruN opendmarc-1.3.2~Beta1/reports/README opendmarc-1.3.2/reports/README --- opendmarc-1.3.2~Beta1/reports/README 2016-12-18 04:49:12.000000000 -0500 +++ opendmarc-1.3.2/reports/README 2017-03-04 08:28:39.000000000 -0500 @@ -36,7 +36,7 @@ SETUP ===== -1) From within the MySQL command line environment, "source mkdb.mysql" to +1) From within the MySQL command line environment, "source schema.mysql" to create the required database and tables. You may also wish to set up users and access grants for users that will access this data. @@ -54,5 +54,5 @@ XML reports based on recent database entries. -- -Copyright (c) 2012-2014, 2016, The Trusted Domain Project. +Copyright (c) 2012-2014, 2016, 2017, The Trusted Domain Project. All rights reserved.