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

[svn:qpsmtpd] r628 - in branches/0.3x/lib: . Qpsmtpd

From:
jpeacock
Date:
March 6, 2006 13:33
Subject:
[svn:qpsmtpd] r628 - in branches/0.3x/lib: . Qpsmtpd
Message ID:
20060306213347.973E8CBA2B@x12.develooper.com
Author: jpeacock
Date: Mon Mar  6 13:33:46 2006
New Revision: 628

Modified:
   branches/0.3x/lib/Qpsmtpd.pm
   branches/0.3x/lib/Qpsmtpd/SMTP.pm

Log:
remove way too agressive blocking of DENY'd servers

Modified: branches/0.3x/lib/Qpsmtpd.pm
==============================================================================
--- branches/0.3x/lib/Qpsmtpd.pm	(original)
+++ branches/0.3x/lib/Qpsmtpd.pm	Mon Mar  6 13:33:46 2006
@@ -433,14 +433,6 @@
   my $self = shift;
   return (defined $self->{_auth_mechanism} ? $self->{_auth_mechanism} : "" );
 }
-
-sub denied {
-  my ($self, $value) = @_;
-  $self->transaction->{_denied} = $value if defined $value;
-  return (defined $self->transaction->{_denied} 
-  	? $self->transaction->{_denied} 
-	: "" );
-}
   
 1;
 

Modified: branches/0.3x/lib/Qpsmtpd/SMTP.pm
==============================================================================
--- branches/0.3x/lib/Qpsmtpd/SMTP.pm	(original)
+++ branches/0.3x/lib/Qpsmtpd/SMTP.pm	Mon Mar  6 13:33:46 2006
@@ -50,12 +50,6 @@
 
   $self->{_counter}++; 
 
-  if ( $cmd !~ /^(rset|quit)$/ and $self->denied ) { # RFC non-compliant
-      $self->log(LOGWARN, "non-RFC compliant MTA disconnected");
-      $self->respond(521, "non-RFC compliant MTA disconnected (#5.7.0)");
-      $self->disconnect;
-  }
-
   if ($cmd !~ /^(\w{1,12})$/ or !exists $self->{_commands}->{$1}) {
     my ($rc, $msg) = $self->run_hooks("unrecognized_command", $cmd, @_);
     if ($rc == DENY_DISCONNECT) {
@@ -156,10 +150,8 @@
   if ($rc == DONE) {
     # do nothing
   } elsif ($rc == DENY) {
-    $self->denied(1);
     $self->respond(550, $msg);
   } elsif ($rc == DENYSOFT) {
-    $self->denied(1);
     $self->respond(450, $msg);
   } elsif ($rc == DENY_DISCONNECT) {
       $self->respond(550, $msg);
@@ -186,10 +178,8 @@
   if ($rc == DONE) {
     # do nothing
   } elsif ($rc == DENY) {
-    $self->denied(1);
     $self->respond(550, $msg);
   } elsif ($rc == DENYSOFT) {
-    $self->denied(1);
     $self->respond(450, $msg);
   } elsif ($rc == DENY_DISCONNECT) {
       $self->respond(550, $msg);
@@ -300,13 +290,11 @@
       return 1;
     }
     elsif ($rc == DENY) {
-      $self->denied(1);
       $msg ||= $from->format . ', denied';
       $self->log(LOGINFO, "deny mail from " . $from->format . " ($msg)");
       $self->respond(550, $msg);
     }
     elsif ($rc == DENYSOFT) {
-      $self->denied(1);
       $msg ||= $from->format . ', temporarily denied';
       $self->log(LOGINFO, "denysoft mail from " . $from->format . " ($msg)");
       $self->respond(450, $msg);
@@ -348,12 +336,10 @@
     return 1;
   }
   elsif ($rc == DENY) {
-    $self->denied(1);
     $msg ||= 'relaying denied';
     $self->respond(550, $msg);
   }
   elsif ($rc == DENYSOFT) {
-    $self->denied(1);
     $msg ||= 'relaying denied';
     return $self->respond(450, $msg);
   }
@@ -611,11 +597,9 @@
     $self->respond(250, ($msg || 'Queued'));
   }
   elsif ($rc == DENY) {
-    $self->denied(1);
     $self->respond(552, $msg || "Message denied");
   }
   elsif ($rc == DENYSOFT) {
-    $self->denied(1);
     $self->respond(452, $msg || "Message denied temporarily");
   } 
   else {



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