Your message dated Tue, 18 Mar 2025 20:41:05 +0000
with message-id <[email protected]>
and subject line Bug#1089039: fixed in mailgraph 1.14-23
has caused the Debian Bug report #1089039,
regarding mailgraph: Support RFC3339 or syslog-ng ISO dates
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1089039: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1089039
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mailgraph
Version: 1.14-20
Severity: normal
Tags: patch

Dear Maintainer,

Upstream version of mailgraph contains embeded Parse:Syslog package version
1.09 which doesn't support RFC3339 dates and new rsyslog format.

As result mailgraph can't read properly mail logs because of invalid date
format for parser.
All lines from logs are discarded.

There are two solutions of the problem.
The first solution is to remove embeded in mailgraph.pl Parse:Syslog package
and use libparse-syslog-perl 1.11.
This is not case because in Debian bookwarm libparse-syslog-perl is 1.10 which
is not case.
This solution is applicable for Debian trixie.
The second solution is to embed Parse:Syslog package version 1.11 in
mailgraph.pl.

Proposing patch to resolve issue by replacing embeded Parse:Syslog package.

See attached one.


-- System Information:
Debian Release: 12.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-28-amd64 (SMP w/10 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mailgraph depends on:
ii  debconf [debconf-2.0]      1.5.82
ii  init-system-helpers        1.65.2
pn  libfile-tail-perl          <none>
pn  librrds-perl               <none>
ii  perl                       5.36.0-7+deb12u1
ii  sysvinit-utils [lsb-base]  3.06-4
ii  ucf                        3.0043+nmu1

Versions of packages mailgraph recommends:
ii  exim4-daemon-light [mail-transport-agent]  4.96-15+deb12u6
pn  httpd | apache2                            <none>

mailgraph suggests no packages.
diff -Nru mailgraph-1.14/debian/changelog mailgraph-1.14/debian/changelog
--- mailgraph-1.14/debian/changelog     2023-01-29 12:16:00.000000000 +0200
+++ mailgraph-1.14/debian/changelog     2024-12-04 15:25:21.000000000 +0200
@@ -1,3 +1,10 @@
+mailgraph (1.14-20.1) UNRELEASED; urgency=medium
+
+  * Upgrade Parse::Syslog to version 1.11 to support RFC3339 or syslog-ng ISO 
dates.
+  * 
+
+ -- Dimitar Angelov <[email protected]>  Wed, 04 Dec 2024 15:25:21 +0200
+
 mailgraph (1.14-20) unstable; urgency=medium
 
   * Declare compliance with Debian Policy 4.6.2.0 (No changes needed).
diff -Nru mailgraph-1.14/debian/patches/120_syslog-parse-upgrade.patch 
mailgraph-1.14/debian/patches/120_syslog-parse-upgrade.patch
--- mailgraph-1.14/debian/patches/120_syslog-parse-upgrade.patch        
1970-01-01 02:00:00.000000000 +0200
+++ mailgraph-1.14/debian/patches/120_syslog-parse-upgrade.patch        
2024-12-04 15:17:25.000000000 +0200
@@ -0,0 +1,175 @@
+Index: mailgraph-1.14/mailgraph.pl
+===================================================================
+--- mailgraph-1.14.orig/mailgraph.pl
++++ mailgraph-1.14/mailgraph.pl
+@@ -5,7 +5,7 @@
+ # copyright (c) 2000-2007 David Schweikert <[email protected]>
+ # released under the GNU General Public License
+ 
+-######## Parse::Syslog 1.09 (automatically embedded) ########
++######## Parse::Syslog 1.11 (automatically embedded) ########
+ package Parse::Syslog;
+ use Carp;
+ use Symbol;
+@@ -13,6 +13,7 @@ use Time::Local;
+ use IO::File;
+ use strict;
+ use vars qw($VERSION);
++use warnings;
+ my %months_map = (
+     'Jan' => 0, 'Feb' => 1, 'Mar' => 2,
+     'Apr' => 3, 'May' => 4, 'Jun' => 5,
+@@ -23,7 +24,7 @@ my %months_map = (
+     'jul' => 6, 'aug' => 7, 'sep' => 8,
+     'oct' => 9, 'nov' =>10, 'dec' =>11,
+ );
+-sub is_dst_switch($$$)
++sub is_dst_switch
+ {
+     my ($self, $t, $time) = @_;
+     # calculate the time in one hour and see if the difference is 3600 
seconds.
+@@ -57,7 +58,7 @@ sub is_dst_switch($$$)
+ # fast timelocal, cache minute's timestamp
+ # don't cache more than minute because of daylight saving time switch
+ # 0: sec, 1: min, 2: h, 3: day, 4: month, 5: year
+-sub str2time($$$$$$$$)
++sub str2time
+ {
+     my $self = shift @_;
+     my $GMT = pop @_;
+@@ -75,6 +76,12 @@ sub str2time($$$$$$$$)
+     my $time;
+     if($GMT) {
+         $time = timegm(@_);
++        # with explicit timezone:
++        if($GMT =~ /^([\+\-])(\d\d):(\d\d)$/) {
++          my $off_secs = 60 * (60*$2 + $3);
++          $off_secs *= -1 if ($1 eq '+');
++          $time += $off_secs;
++        }
+     }
+     else {
+         $time = timelocal(@_);
+@@ -109,7 +116,7 @@ sub str2time($$$$$$$$)
+     $self->{last_time} = $time;
+     return $time+($self->{dst_comp}||0);
+ }
+-sub _use_locale($)
++sub _use_locale
+ {
+     use POSIX qw(locale_h strftime);
+     my $old_locale = setlocale(LC_TIME);
+@@ -121,7 +128,7 @@ sub _use_locale($)
+     }
+     setlocale(LC_TIME, $old_locale);
+ }
+-sub new($$;%)
++sub new
+ {
+     my ($class, $file, %data) = @_;
+     croak "new() requires one argument: file" unless defined $file;
+@@ -140,11 +147,11 @@ sub new($$;%)
+     }
+     elsif(! ref $file) {
+         if($file eq '-') {
+-            my $io = new IO::Handle;
++            my $io = IO::Handle->new();
+             $data{file} = $io->fdopen(fileno(STDIN),"r");
+         }
+         else {
+-            $data{file} = new IO::File($file, "<");
++            $data{file} = IO::File->new($file, "<");
+             defined $data{file} or croak "can't open $file: $!";
+         }
+     }
+@@ -164,7 +171,7 @@ sub new($$;%)
+     }
+     return bless \%data, $class;
+ }
+-sub _year_increment($$)
++sub _year_increment
+ {
+     my ($self, $mon) = @_;
+     # year change
+@@ -182,7 +189,7 @@ sub _year_increment($$)
+     }
+     $self->{_last_mon} = $mon;
+ }
+-sub _next_line($)
++sub _next_line
+ {
+     my $self = shift;
+     my $f = $self->{file};
+@@ -193,7 +200,7 @@ sub _next_line($)
+         return $f->getline;
+     }
+ }
+-sub _next_syslog($)
++sub _next_syslog
+ {
+     my ($self) = @_;
+     while($self->{_repeat}>0) {
+@@ -213,16 +220,33 @@ sub _next_syslog($)
+             \s+
+             (?:\[LOG_[A-Z]+\]\s+)?  # FreeBSD
+             (.*)                 # text  -- 7
++            $/x or
++        $str =~ /^
++            (\d\d\d\d)-(\d\d)-(\d\d)       # RFC3339 or syslog-ng ISO date  
-- 1, 2, 3
++            T
++            (\d+):(\d+):(\d+)(?:\.\d+)?    # time (optional frac_sec)  -- 4, 
5, 6
++            (Z|[\+\-]\d\d:\d\d)            # TZ -- 7
++            \s
++            ([-\w\.\@:]+)        # host  -- 8
++            \s+
++            (.*)                 # text  -- 9
+             $/x or do
+         {
+             warn "WARNING: line not in syslog format: $str";
+             next line;
+         };
+-        my $mon = $months_map{$1};
+-        defined $mon or croak "unknown month $1\n";
+-        $self->_year_increment($mon);
++        my ($time, $host, $text);
+         # convert to unix time
+-        my $time = 
$self->str2time($5,$4,$3,$2,$mon,$self->{year}-1900,$self->{GMT});
++        if (defined($months_map{$1})) { # BSD Syslog
++          my $mon = $months_map{$1};
++          defined $mon or croak "unknown month $1\n";
++          $self->_year_increment($mon);
++          $time = 
$self->str2time($5,$4,$3,$2,$mon,$self->{year}-1900,$self->{GMT});
++          ($host, $text) = ($6, $7);
++        } else { # RFC3339/syslog-ng
++          $time = $self->str2time($6,$5,$4,$3,$2-1,$1-1900,$7);
++          ($host, $text) = ($8, $9);
++        }
+         if(not $self->{allow_future}) {
+             # accept maximum one day in the present future
+             if($time - time > 86400) {
+@@ -230,7 +254,6 @@ sub _next_syslog($)
+                 next line;
+             }
+         }
+-        my ($host, $text) = ($6, $7);
+         # last message repeated ... times
+         if($text =~ /^(?:last message repeated|above message repeats) (\d+) 
time/) {
+             next line if defined $self->{repeat} and not $self->{repeat};
+@@ -287,7 +310,7 @@ sub _next_syslog($)
+     }
+     return undef;
+ }
+-sub _next_metalog($)
++sub _next_metalog
+ {
+     my ($self) = @_;
+     my $file = $self->{file};
+@@ -341,7 +364,7 @@ sub _next_metalog($)
+     }
+     return undef;
+ }
+-sub next($)
++sub next
+ {
+     my ($self) = @_;
+     if($self->{type} eq 'syslog') {
diff -Nru mailgraph-1.14/debian/patches/series 
mailgraph-1.14/debian/patches/series
--- mailgraph-1.14/debian/patches/series        2022-02-28 09:14:47.000000000 
+0200
+++ mailgraph-1.14/debian/patches/series        2024-12-04 15:18:26.000000000 
+0200
@@ -7,3 +7,4 @@
 103_postfix-long-queue-IDs.diff
 105_postscreen.diff
 #110_mailgraph.cgi.patch
+120_syslog-parse-upgrade.patch

--- End Message ---
--- Begin Message ---
Source: mailgraph
Source-Version: 1.14-23
Done: Jörg Frings-Fürst <[email protected]>

We believe that the bug you reported is fixed in the latest version of
mailgraph, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jörg Frings-Fürst <[email protected]> (supplier of updated mailgraph package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 18 Mar 2025 17:42:22 +0100
Source: mailgraph
Architecture: source
Version: 1.14-23
Distribution: unstable
Urgency: medium
Maintainer: Jörg Frings-Fürst <[email protected]>
Changed-By: Jörg Frings-Fürst <[email protected]>
Closes: 1089039
Changes:
 mailgraph (1.14-23) unstable; urgency=medium
 .
   * Upgrade Parse::Syslog to version 1.11 to support RFC3339 or
     syslog-ng ISO dates (Closes: #1089039).
     (Thanks to Dimitar Angelov <[email protected]>)
   * Declare compliance with Debian Policy 4.7.2 (No changes needed).
   * debian/control:
     - Change Vcs-Git from git: to https:.
   * debian/copyright:
     - Add year 2025 to myself.
   * New debian/lrc.config for overright lrc tests.
Checksums-Sha1:
 6ed6b8f1bc1c00e87bb1ebb9029075584809e52a 1689 mailgraph_1.14-23.dsc
 a768052841bb8ed578adc5f327ac19e46b9ccdd7 32816 mailgraph_1.14-23.debian.tar.xz
 5ea18731d2ebadd52ef284dee98f296c8d19e08a 5103 
mailgraph_1.14-23_source.buildinfo
Checksums-Sha256:
 bfc172a825de89ca2c9549b71fb9506f1719d7e2bd04b4abb107621e0a9f6ace 1689 
mailgraph_1.14-23.dsc
 17163e46252c301e71858a4f0925feabf563c96b49e5feb62fbc667f95328780 32816 
mailgraph_1.14-23.debian.tar.xz
 d1b461ac9a06d336ca0079efed684998b5cc40013f51ae2fe8dfc0ea3f7614e6 5103 
mailgraph_1.14-23_source.buildinfo
Files:
 5ac3ce16ccc35ec184c3ed6a5bf4eb84 1689 admin optional mailgraph_1.14-23.dsc
 7f9168c5fb574a205ff38fc059197d73 32816 admin optional 
mailgraph_1.14-23.debian.tar.xz
 23bd5f9e05530a5c4e1dbbe5f3d80a52 5103 admin optional 
mailgraph_1.14-23_source.buildinfo


-----BEGIN PGP SIGNATURE-----

iQHEBAEBCgAuFiEEQGIgyLhVKAI3jM5BH1x6i0VWQxQFAmfZ0K0QHGJhZ2VAZGVi
aWFuLm9yZwAKCRAfXHqLRVZDFLkwC/0dBwK8dEnjkr9wQJkjSO4Zqa8ykkhe1pJp
HxITrfG8SiYoSll3Ik/jNvqqLVlqEMSmTLHvIqLymYMCRqiPNP5wRlY1RVBuxq88
AqkjXDKOx3h9uQI2/vTHmJBW8pN65wg9ymJjrDrLioMoHv3MilrHLQevWYPWUQpT
eDWswZDEWUGnWGNj/VMMFFUva5TAPm7isgZEKvHHZF8dZyVILSmUXvZP2FAtCLrF
DCbHBuX0vffcP3Jgt7D7Scvr+FCDNLflDYhEJJ+UatofGF8dKbxlkdr9MVUuanHz
dYN1StnhyGhEaSmvBCeXI29a0J+jSA8l6on/8EJ8BGKV1WvTkJ6Y7fS5uhn95hcW
2yUSEBvueJs2AzMq8U4eO1YJAnrci1R2FJR+9U8o20a53/8XKIaarUDfsZYi6Fkw
KkziW8dZ6ziS4YgfbQJ02fSjj+4pefDtCUfjtRtEsK50pIGLPhiKCvV5hpSVP3DQ
l7WEsaiTetPmGY7SHmg0OV6UV9R9uFU=
=gMlS
-----END PGP SIGNATURE-----

Attachment: pgp2Ksdjw8GB_.pgp
Description: PGP signature


--- End Message ---

Reply via email to