Bug#257162: marked as done (Mail::Message::Head::Complete::guessTimestamp complains for mails with no 'date' or 'received' headers)

Debian Bug Tracking System owner at bugs.debian.org
Fri Dec 30 19:33:14 UTC 2005


Your message dated Fri, 30 Dec 2005 21:29:02 +0200
with message-id <20051230192902.GA51002 at sirppi.helsinki.fi>
and subject line Bug#257162: Mail::Message::Head::Complete::guessTimestamp complains for mails with no 'date' or 'received' headers
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 1 Jul 2004 17:07:20 +0000
>From asuffield at suffields.me.uk Thu Jul 01 10:07:20 2004
Return-path: <asuffield at suffields.me.uk>
Received: from spc1-sout4-4-0-cust241.cosh.broadband.ntl.com (cyclone.suffields.me.uk) [81.103.170.241] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Bg51s-0005Y1-00; Thu, 01 Jul 2004 10:07:20 -0700
Received: from asuffield by cyclone.suffields.me.uk with local (Exim 3.36 #1 (Debian))
	id 1Bg51o-0000uj-00
	for <submit at bugs.debian.org>; Thu, 01 Jul 2004 18:07:16 +0100
Date: Thu, 1 Jul 2004 18:07:16 +0100
From: Andrew Suffield <asuffield at debian.org>
To: submit at bugs.debian.org
Subject: Mail::Message::Head::Complete::guessTimestamp complains for mails with no 'date' or 'received' headers
Message-ID: <20040701170716.GA3429 at suffields.me.uk>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="5mCyUwZo2JvN/JJP"
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040523i
Sender: Andrew Suffield <asuffield at suffields.me.uk>
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 


--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: libmail-box-perl

sub guessTimestamp()
{   my $self =3D shift;
    return $self->{MMH_timestamp} if exists $self->{MMH_timestamp};

    my $stamp;
    if(my $date =3D $self->get('date'))
    {   $stamp =3D Mail::Message::Field->dateToTimestamp($date);
    }

    unless($stamp)
    {   foreach (reverse $self->get('received'))
        {   $stamp =3D Mail::Message::Field->dateToTimestamp($_->comment);
            last if $stamp;
        }
    }

    $self->{MMH_timestamp} =3D $stamp > 0 ? $stamp : undef;
}

If neither header is present, $stamp is undef, so you get a warning on
'$stamp > 0'.

--=20
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

--5mCyUwZo2JvN/JJP
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA5ETElpK98RSteX8RAiB4AKCF+SSYdEe2at5KtY29dzOYwT5EfQCeJ2nx
VDW1VCLO/0qVG4enVGOG3ng=
=gbOU
-----END PGP SIGNATURE-----

--5mCyUwZo2JvN/JJP--

---------------------------------------
Received: (at 257162-done) by bugs.debian.org; 30 Dec 2005 19:29:06 +0000
>From ntyni at cc.helsinki.fi Fri Dec 30 11:29:06 2005
Return-path: <ntyni at cc.helsinki.fi>
Received: from sirppi.helsinki.fi ([128.214.205.27])
	by spohr.debian.org with esmtp (Exim 4.50)
	id 1EsPw1-0007lw-Ja
	for 257162-done at bugs.debian.org; Fri, 30 Dec 2005 11:29:06 -0800
Received: from sirppi.helsinki.fi (localhost [127.0.0.1])
	by sirppi.helsinki.fi (8.13.2/8.13.2) with ESMTP id jBUJT2Ur187442
	for <257162-done at bugs.debian.org>; Fri, 30 Dec 2005 21:29:02 +0200 (EET)
Received: (from ntyni at localhost)
	by sirppi.helsinki.fi (8.13.2/8.13.2/Submit) id jBUJT2fH168666
	for 257162-done at bugs.debian.org; Fri, 30 Dec 2005 21:29:02 +0200 (EET)
Date: Fri, 30 Dec 2005 21:29:02 +0200
From: Niko Tyni <ntyni at iki.fi>
To: 257162-done at bugs.debian.org
Subject: Re: Bug#257162: Mail::Message::Head::Complete::guessTimestamp complains for mails with no 'date' or 'received' headers
Message-ID: <20051230192902.GA51002 at sirppi.helsinki.fi>
References: <20040701170716.GA3429 at suffields.me.uk> <20051229213656.GA391328 at sirppi.helsinki.fi> <20051229231552.GA32400 at suffields.me.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20051229231552.GA32400 at suffields.me.uk>
User-Agent: Mutt/1.4.2i
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
	HAS_PACKAGE autolearn=ham version=2.60-bugs.debian.org_2005_01_02

Package: libmail-box-perl
Version: 2.060-1

On Thu, Dec 29, 2005 at 11:15:52PM +0000, Andrew Suffield wrote:

> Good question. Unfortunately, answering it would require that I
> remember what project I was working on at a point some 18 months
> ago... I don't have the faintest idea. Obviously it happened
> somehow. My *guess* would be that it was acquired via
> Mail::Message->read and the mail I read in did indeed have neither
> field. There's a good chance that I was doing something with a mail
> that happened to be 'not strictly valid', but that's depressingly
> common with mail. If it had no Received line then it was probably
> supplied by the user.

OK, thanks. I have forwarded this to the upstream bug report (still at
http://rt.cpan.org/NoAuth/Bug.html?id=15900 ).

> On reflection it would not be unreasonable to croak in this case
> (although I'd hope that something more permissive would work, like
> using the current time), and I was probably objecting to it 'working'
> but spewing an incomprehensible warning - it should either work
> cleanly or throw an exception.

I also mentioned the possibilities of bailing out or using the current
time in the upstream bug report, along with a few other ideas for a
timestamp source.

I'm closing this Debian bug now, since the main problem ('complains for
mails...') is fixed. Please feel free to reopen it if you think
guessTimestamp() returning undef in this case is unacceptable/'not working'.

Cheers,
-- 
Niko Tyni	ntyni at iki.fi



More information about the pkg-perl-maintainers mailing list