--- Postfix.pm.070626	2007-06-26 17:22:21.000000000 +0200
+++ Postfix.pm	2007-06-26 18:39:08.000000000 +0200
@@ -290,6 +290,7 @@
     my($ORIGFound, $TOFound, $FROMFound, $IPFound, $TIMEFound);
     my($ErrorFound, $ERecordFound, $rectype, $recdata);
     my $InSubject = 0; # Are we adding continuation subject lines?
+    my $pRecordsFound = 0; # p record spin-through of body? //Glenn
     my $OriginalPos = 0; # p record jumpoff point //Glenn
     my $MaxpRecPos = 0; # Max position where a p record might occur.
     my @npos = (); # save all p record positions, although we only
@@ -408,6 +409,7 @@
 	# When we hit the next p record it should be the "jump back to
         # original pos" one, or another forward p record... so we'll
 	# check that and act accordingly..
+	$pRecordsFound = 1; # If we find a p record we need remember this to handle body ...
 	next if ($recdata+0 == 0); # Ignore zero (placeholder) jumps
 	if ($recdata+0 > $MaxpRecPos) {
 	    MailScanner::Log::WarnLog("p record handling: Attempt to jump beyond end of file, aborting file.");
@@ -476,6 +478,7 @@
 	 # When we hit the next p record it should be the "jump back to
          # original pos" one, or another forward p record... so we'll
 	 # check that and act accordingly..
+         $pRecordsFound = 1; # If we find a p record we need remember this to handle body ...
 	 next if ($recdata+0 == 0); # Ignore zero (placeholder) jumps
 	 if ($recdata+0 > $MaxpRecPos) {
 	    MailScanner::Log::WarnLog("p record handling: Attempt to jump beyond end of file, aborting file.");
@@ -517,6 +520,7 @@
 	 }
 	 next; # done, don't add a spurious "converted p to N" record.
       }
+      next if ($rectype eq 'w'); # Skip deleted (w) records ... Else they will be transformed to Normal (N) records.
       push @{$message->{headers}}, $recdata; # Headers have no leading N
       if ($recdata =~ /^Subject:\s*(\S.*)?$/i) {
         $message->{subject} = $1;
@@ -554,8 +558,10 @@
 #    seek $RQf, $MsgContSize+$DataOffset, 0;
 
 # Inelegant, but working. Instead of an efficient seek, we spinn through to
-# after X record. Unless we don't have a body to spin through.
-    if (!$message->{nobody}) {
+# after X record. Unless we don't have a body to spin through. Also skip
+# the spin if we don't have any p records already (to not punish the normal
+# case).
+    if (!$message->{nobody} && $pRecordsFound) {
       while(($rectype, $recdata) = ReadRecord($RQf)) {
         #print STDERR "Metadata type $rectype data \"$recdata\"\n";
         if (!defined($rectype) or $rectype eq 'X') {