Making the /^From / detection a little smarter avoids false alarms created by ^From in the body of the message. I found that I have this problem on mboxes that were created from my sent mail, not having traversed through a mail server. All I look for is a time stamp, but this could be extended to look for the email address of the sender before the time stamp. For example, the line:

From Tuesday to Wednesday is when I eat cheese.

Would not be confused with a valid /^From /, but the line:

From 10:00 to 12:00 is when I eat herring.

would be.  The following patch was enough for me so that is where I stopped.

--- /usr/bin/mb2md    2008-05-05 18:08:27.000000000 -0600
+++ mb2md    2010-08-10 20:17:34.149706012 -0600
@@ -1002,7 +1002,7 @@
# exchange possible Windows EOL (CRLF) with Unix EOL (LF)
             $_ =~ s/\r\n$/\n/;

-            if ( /^From /
+            if ( /^From .*\d\d:\d\d.*/
&& $previous_line_was_empty
&& (!defined $contentlength)
            )




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to