Included inline are patches for two bugs in trunk.  Not sure whether they
are needed for 0.29.

First, now that body_start() is read-only, the body_start($size) in
SMTP::data() needs to become set_body_start().

Second, Transaction::body_write() needs to update _body_current_pos for
array-backed messages.  Otherwise, the set_body_start() in previous patch
will just set _start_body to 0 and headers will duplicate when the message
is queued.

Brian




Index: lib/Qpsmtpd/SMTP.pm
===================================================================
--- lib/Qpsmtpd/SMTP.pm (revision 393)
+++ lib/Qpsmtpd/SMTP.pm (working copy)
@@ -472,7 +472,7 @@
         # save us buffering the mail content.
 
        # Save the start of just the body itself        
-       $self->transaction->body_start($size);
+       $self->transaction->set_body_start();
 
       }
 



Index: lib/Qpsmtpd/Transaction.pm
===================================================================
--- lib/Qpsmtpd/Transaction.pm  (revision 393)
+++ lib/Qpsmtpd/Transaction.pm  (working copy)
@@ -107,10 +107,12 @@
     while ($$ref =~ m/\G(.*?\n)/gc) {
       push @{ $self->{_body_array} }, $1;
       $self->{_body_size} += length($1);
+      ++$self->{_body_current_pos};
     }
     if ($$ref =~ m/\G(.+)\z/gc) {
       push @{ $self->{_body_array} }, $1;
       $self->{_body_size} += length($1);
+      ++$self->{_body_current_pos};
     }
     if ($self->{_body_size} >= $self->{_size_threshold}) {
       #warn("spooling to disk\n");

Reply via email to