cvs commit: qpsmtpd/lib/Qpsmtpd Constants.pm SMTP.pm

[email protected] (Robert Spier)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     04/06/10 23:06:31

  Modified:    lib/Qpsmtpd Constants.pm SMTP.pm
  Log:
  add DENYSOFTHARD status
  
  Revision  Changes    Path
  1.8       +5 -3      qpsmtpd/lib/Qpsmtpd/Constants.pm
  
  Index: Constants.pm
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/Constants.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -r1.7 -r1.8
  --- Constants.pm	5 Mar 2004 12:46:23 -0000	1.7
  +++ Constants.pm	11 Jun 2004 06:06:30 -0000	1.8
  @@ -10,11 +10,13 @@
   @EXPORT = (@common, @loglevels);
   
   use constant OK       => 900;
  -use constant DENY     => 901;
  -use constant DENYSOFT => 902;
  +use constant DENY     => 901;   # 550
  +use constant DENYSOFT => 902;   # 450
  +use constant DENYHARD => 903;   # 550 + disconnect
  +use constant DENYSOFTHARD => 904; # 450 + disconnect
   use constant DECLINED => 909;
   use constant DONE     => 910;
  -use constant DENYHARD     => 903;
  +
   
   # log levels
   use constant LOGDEBUG   => 8;
  
  
  
  1.26      +6 -0      qpsmtpd/lib/Qpsmtpd/SMTP.pm
  
  Index: SMTP.pm
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/SMTP.pm,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -w -r1.25 -r1.26
  --- SMTP.pm	5 Mar 2004 12:46:23 -0000	1.25
  +++ SMTP.pm	11 Jun 2004 06:06:30 -0000	1.26
  @@ -236,6 +236,12 @@
         $self->respond(550, $msg);
         $self->disconnect;
       }
  +    elsif ($rc == DENYSOFTHARD) {
  +      $msg ||= $from->format . ', temporarily denied';
  +      $self->log(LOGINFO, "denysoft mail from " . $from->format . " ($msg)");
  +      $self->respond(450, $msg);
  +      $self->disconnect;
  +    }
       else { # includes OK
         $self->log(LOGINFO, "getting mail from ".$from->format);
         $self->respond(250, $from->format . ", sender OK - how exciting to get mail from you!");
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.