[email protected]
[Top] [All Lists]

Bug#316463: marked as forwarded (/usr/share/perl5/Mail/Mbox/MessageParse

Subject: Bug#316463: marked as forwarded /usr/share/perl5/Mail/Mbox/MessageParser.pm: In appropriately splitting emails at wrong headers
From: Debian Bug Tracking System
Date: Fri, 01 Jul 2005 07:49:08 -0700
Your message dated Fri, 1 Jul 2005 10:23:41 -0400
with message-id <[email protected]>
has caused the Debian Bug report #316463,
regarding /usr/share/perl5/Mail/Mbox/MessageParser.pm: In appropriately 
splitting emails at wrong headers
to be marked as having been forwarded to the upstream software
author(s) David Coppit <[email protected]>.

(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 316463-forwarded) by bugs.debian.org; 1 Jul 2005 14:23:59 +0000
>From [email protected] Fri Jul 01 07:23:59 2005
Return-path: <[email protected]>
Received: from kitenet.net [64.62.161.42] (postfix)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DoMQx-0004A9-00; Fri, 01 Jul 2005 07:23:59 -0700
Received: from dragon.kitenet.net (dpc6682244174.direcpc.com [66.82.244.174])
        (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
        (Client CN "Joey Hess", Issuer "Joey Hess" (verified OK))
        by kitenet.net (Postfix) with ESMTP id 8D5A617EFB;
        Fri,  1 Jul 2005 14:23:56 +0000 (GMT)
Received: by dragon.kitenet.net (Postfix, from userid 1000)
        id ED20D6E22D; Fri,  1 Jul 2005 10:23:42 -0400 (EDT)
Date: Fri, 1 Jul 2005 10:23:41 -0400
From: Joey Hess <[email protected]>
To: David Coppit <[email protected]>
Cc: [email protected]
Subject: FWD: Bug#316463: /usr/share/perl5/Mail/Mbox/MessageParser.pm: In 
appropriately splitting emails at wrong headers
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
        protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l"
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
Delivered-To: [email protected]
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-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
X-Spam-Level: 


--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Here's a bug report for MessageParser..

----- Forwarded message from Brian May <[email protected]> -----

=46rom: Brian May <[email protected]>
Date: Fri, 01 Jul 2005 13:06:57 +1000
To: Debian Bug Tracking System <[email protected]>
Subject: Bug#316463: /usr/share/perl5/Mail/Mbox/MessageParser.pm: In approp=
riately splitting emails at wrong headers
Reply-To: Brian May <[email protected]>, [email protected]
X-Mailer: reportbug 3.8

Package: libmail-mbox-messageparser-perl
Version: 1.2130-1
Severity: important
File: /usr/share/perl5/Mail/Mbox/MessageParser.pm

I noticed this warning when using MboxParser.pm that uses
/usr/share/perl5/Mail/Mbox/MessageParser.pm.

--- cut ---
Use of uninitialized value in split at
/usr/share/perl5/Mail/MboxParser.pm line 529.
--- cut ---

Futher investigation, I found an a email containing a forwarded email as
a mime attachment:

--- cut ---
>From nobody Mon Mar 22 14:54:03 2004
Return-Path: <[email protected]>
Delivered-To: [email protected]
[ headers omitted ]
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=3D"=3D-=3D-=3D"
X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at
snoopy.apana.org.au
X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at sws.net.au
X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at
snoopy.apana.org.au
X-Bogosity: No, tests=3Dbogofilter, spamicity=3D0.000000, version=3D0.15.4

--=3D-=3D-=3D

[...]

--=3D-=3D-=3D
Content-Type: message/rfc822
Content-Disposition: inline

X-From-Line: nobody Mon Mar 22 14:39:30 2004
To: [email protected]
Subject: [email protected]
X-Draft-From: ("nnimap+snoopy:INBOX.lists.luv" "")
=46rom: Brian May <[email protected]>
X-Home-Page: http://snoopy.apana.org.au/~bam/
Bcc: Brian May <[email protected]>

--=3D-=3D-=3D--
--- cut ---

For some truely weird reason, MessageParser.pm has split the *single* email=
 in
three place, not only at the correct "From" header, but also at the
"X-From-Line:" header and also the "X-Draft-From:" header.

These headers appear in the source code in three places:

--- cut /usr/share/perl5/Mail/Mbox/MessageParser.pm ---
# Detects whether an ASCII file is a mailbox, based on whether it has
# a line whose prefix is 'From' or 'X-From-Line:' or 'X-Draft-From:',
# and another line whose prefix is 'Received ', 'Date:', 'Subject:',
# 'X-Status:', 'Status:', or 'To:'.
--- cut ---

and

--- cut /usr/share/perl5/Mail/Mbox/MessageParser/Config.pm ---
# X-From-Line is used by Gnus, and From is used by normal Unix
# format. Newer versions of Gnus use X-Draft-From
  'from_pattern' =3D> q/(?x)^
      (X-Draft-From:\s|X-From-Line:\s|
      From\s
        # Skip names, months, days
        (?> [^:]+ )
        # Match time
        (?: :\d\d){1,2}
        # Match time zone (EST), hour shift (+0500), and-or year
        (?: \s+ (?: [A-Z]{2,3} | [+-]?\d{4} ) ){1,3}
        # smail compatibility
        (\sremote\sfrom\s.*)?
      )/,
--- cut ---

and

--- cut /usr/share/perl5/Mail/Mbox/MessageParser/Grep.pm ---
@grep_results =3D
    `$Mail::Mbox::MessageParser::Config{'programs'}{'grep'}
    --extended-regexp --line-number --byte-offset --binary-files=3Dtext
    "^(X-Draft-From: .*|X-From-Line: .*|From [^:]+(:[0-9][0-9]){1,2}
    ([A-Z]{2,3} [0-9]{4}|[0-9]{4} [+-][0-9]{4}|[0-9]{4})( remote from
    .*)?)\r?\$" "$filename"`;
--- cut ---

(note: wrapped to one line)

I am not sure about the first two references, but the last reference is
WRONG! Yes, gnus does use the headers (as shown above), but is does not
use them to split emails.

In fact, it looks like Gnus renamed the From header to "X-From-Line" so
splitting would *not* *occur* at that point.

Why X-Draft-From is used is beyond me, it is unrelated to the From
header.

I recommend deleting *all* instances of X-Draft-From and X-From-Line header=
s,
it would appear that whoever wrote this code didn't understand that they do=
n't
serve the same purpose as the From header, and cannot be used to split emai=
l.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (50, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-k7
Locale: LANG=3DC, LC_CTYPE=3DC (charmap=3DANSI_X3.4-1968)

Versions of packages libmail-mbox-messageparser-perl depends on:
ii  libfilehandle-unget-perl      0.1621-1   a FileHandle which supports un=
gett
ii  perl                          5.8.4-8    Larry Wall's Practical Extract=
ion=20

-- no debconf information


----- End forwarded message -----

--=20
see shy jo

--XsQoSWH+UP9D9v3l
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

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

iD8DBQFCxVHtd8HHehbQuO8RAgGuAJ9GbnQmhj2JFupxGvIVrpQwydVJHACgkpyY
M6gy0NQsd2O/oySSXZipibc=
=Ze3i
-----END PGP SIGNATURE-----

--XsQoSWH+UP9D9v3l--


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

<Prev in Thread] Current Thread [Next in Thread>
  • Bug#316463: marked as forwarded (/usr/share/perl5/Mail/Mbox/MessageParser.pm: In appropriately splitting emails at wrong headers), Debian Bug Tracking System <=