diff -Naur MIME-tools-5.411/lib/MIME/Parser.pm MIME-tools-5.411a-MailScanner-Patched/lib/MIME/Parser.pm
--- MIME-tools-5.411/lib/MIME/Parser.pm	Thu Oct 10 20:57:34 2002
+++ MIME-tools-5.411a-MailScanner-Patched/lib/MIME/Parser.pm	Thu Oct 10 20:58:44 2002
@@ -593,6 +593,7 @@
 #
 # I<Instance method.>
 # Process and return the next header.
+# Return undef if, instead of a header, the encapsulation boundary is found.
 # Fatal exception on failure.
 #
 sub process_header {
@@ -613,6 +614,10 @@
     foreach (@headlines) { s/[\r\n]+\Z/\n/ }  ### fold
 
     ### How did we do?
+    if ($hdr_rdr->eos_type eq 'DELIM') {
+       $self->whine("bogus part, without CRLF before body");
+       return;
+    }
     ($hdr_rdr->eos_type eq 'DONE') or
 	$self->error("unexpected end of header\n");
 
@@ -984,7 +989,17 @@
 
     ### Parse and add the header:
     my $head = $self->process_header($in, $rdr);
-    $ent->head($head);   
+    if (not defined $head) {
+       $self->debug("bogus empty part");
+       $head = $self->interface('HEAD_CLASS')->new;
+       $head->mime_type('text/plain; charset=US-ASCII');
+       $ent->head($head);
+       $ent->bodyhandle($self->new_body_for($head));
+       $ent->bodyhandle->open("w")->close;
+       $self->results->level(-1);
+       return $ent;
+    }
+    $ent->head($head);
 
     ### Tweak the content-type based on context from our parent...
     ### For example, multipart/digest messages default to type message/rfc822:
