develooper Front page | perl.cvs.qpsmtpd | Postings from March 2007

[svn:qpsmtpd] r727 - trunk/lib/Qpsmtpd

From:
msergeant
Date:
March 19, 2007 15:36
Subject:
[svn:qpsmtpd] r727 - trunk/lib/Qpsmtpd
Message ID:
20070319214057.AAAC4CBCBB@x12.develooper.com
Author: msergeant
Date: Mon Mar 19 14:40:56 2007
New Revision: 727

Modified:
   trunk/lib/Qpsmtpd/PollServer.pm

Log:
More pollserver fixes


Modified: trunk/lib/Qpsmtpd/PollServer.pm
==============================================================================
--- trunk/lib/Qpsmtpd/PollServer.pm	(original)
+++ trunk/lib/Qpsmtpd/PollServer.pm	Mon Mar 19 14:40:56 2007
@@ -249,7 +249,7 @@
         $data =~ s/\r\n/\n/mg;
         $data =~ s/^\.\./\./mg;
         
-        if ($self->{in_header} and $data =~ s/\A(.*?)\n[ \t]*\n//ms) {
+        if ($self->{in_header} and $data =~ s/\A(.*?\n)\n/\n/ms) {
             $self->{header_lines} .= $1;
             # end of headers
             $self->{in_header} = 0;
@@ -260,7 +260,7 @@
             #   When forwarding a message into or out of the Internet environment, a
             #   gateway MUST prepend a Received: line, but it MUST NOT alter in any
             #   way a Received: line that is already in the header.
-            my @header_lines = split(/\n/, $self->{header_lines});
+            my @header_lines = split(/^/m, $self->{header_lines});
     
             my $header = Mail::Header->new(\@header_lines,
                                             Modify => 0, MailFrom => "COERCE");
@@ -271,15 +271,16 @@
     
             # FIXME - call plugins to work on just the header here; can
             # save us buffering the mail content.
+            
+            # Save the start of just the body itself	
+            $self->transaction->set_body_start();
         }
         
         if ($self->{in_header}) {
             $self->{header_lines} .= $data;
         }
-        else {
-            $self->transaction->body_write(\$data);
-        }
-        
+
+        $self->transaction->body_write(\$data);
         $self->{data_size} += length $data;
     }
  



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About