[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 [] (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 [])
        (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

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

--- 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
X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at sws.net.au
X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at
X-Bogosity: No, tests=3Dbogofilter, spamicity=3D0.000000, version=3D0.15.4



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]>

--- cut ---

For some truely weird reason, MessageParser.pm has split the *single* email=
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 ---


--- 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)^
        # 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
--- cut ---


--- cut /usr/share/perl5/Mail/Mbox/MessageParser/Grep.pm ---
@grep_results =3D
    --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

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

-- 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=
ii  perl                          5.8.4-8    Larry Wall's Practical Extract=

-- no debconf information

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

see shy jo

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

Version: GnuPG v1.4.1 (GNU/Linux)



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 <=