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="=-=-=" 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=bogofilter, spamicity=0.000000, version=0.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" "") From: 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 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' => 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 = `$Mail::Mbox::MessageParser::Config{'programs'}{'grep'} --extended-regexp --line-number --byte-offset --binary-files=text "^(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 headers, it would appear that whoever wrote this code didn't understand that they don't serve the same purpose as the From header, and cannot be used to split email. -- 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=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages libmail-mbox-messageparser-perl depends on: ii libfilehandle-unget-perl 0.1621-1 a FileHandle which supports ungett ii perl 5.8.4-8 Larry Wall's Practical Extraction -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]