Author: msergeant
Date: Fri Aug  3 13:16:01 2007
New Revision: 764

Modified:
   trunk/lib/Qpsmtpd/SMTP.pm

Log:
Fix bug which breaks queue plugins that implement continuations


Modified: trunk/lib/Qpsmtpd/SMTP.pm
==============================================================================
--- trunk/lib/Qpsmtpd/SMTP.pm   (original)
+++ trunk/lib/Qpsmtpd/SMTP.pm   Fri Aug  3 13:16:01 2007
@@ -719,18 +719,18 @@
   elsif ($rc == DENY) {
     $msg->[0] ||= "Message denied";
     $self->respond(552, @$msg);
+    # DATA is always the end of a "transaction"
+    return $self->reset_transaction;
   }
   elsif ($rc == DENYSOFT) {
     $msg->[0] ||= "Message denied temporarily";
     $self->respond(452, @$msg);
+    # DATA is always the end of a "transaction"
+    return $self->reset_transaction;
   } 
   else {
     $self->queue($self->transaction);
   }
-
-  # DATA is always the end of a "transaction"
-  return $self->reset_transaction;
-
 }
 
 sub getline {
@@ -765,6 +765,10 @@
 
 sub queue_respond {
   my ($self, $rc, $msg, $args) = @_;
+  
+  # reset transaction if we queued the mail
+  return $self->reset_transaction;
+  
   if ($rc == DONE) {
     return 1;
   }

Reply via email to