On Thu, 04 Sep 2003, Ask Bj?rn Hansen wrote:
> "Breaking out" at that point wouldn't work, as the client is just 
> spewing data to us until it tells us that it's done, so leaving the 
> connection open won't work.  Exiting it what qmail-smtpd does (which 
> might or might not make it right :-) )
> 
> I think what it needs to do is reset the transaction 
> ($self->reset_transaction) and then call disconnect.

Would something like the following work?
        -- Robert


--- qpsmtpd-0.26/lib/Qpsmtpd/SMTP.pm    2003-04-21 05:42:01.000000000 -0400
+++ qpsmtpd.work/lib/Qpsmtpd/SMTP.pm    2003-09-04 13:50:36.000000000 -0400
@@ -335,8 +335,14 @@
   while (<STDIN>) {
     $complete++, last if $_ eq ".\r\n";
     $i++;
-    $self->respond(451, "See http://develooper.com/code/qpsmtpd/barelf.html";), exit
-      if $_ eq ".\n";
+
+    # If we get an improper line, reset the transaction and disconnect
+    if ($_ eq ".\n") {
+       $self->respond(451, "See http://develooper.com/code/qpsmtpd/barelf.html";);
+       $self->reset_transaction;
+       return $self->disconnect;
+    };
+
     # add a transaction->blocked check back here when we have line by line plugin 
access...
     unless (($max_size and $size > $max_size)) {
       s/\r\n$/\n/;


-- 
    Robert James Kaes    ---  Flarenet Inc.  ---    (519) 426-3782
                 http://www.flarenet.com/consulting/
      * Putting the Service Back in Internet Service Provider *

Reply via email to