cvs commit: qpsmtpd/lib/Qpsmtpd SMTP.pm

[email protected] (John Peacock) 25 Feb 2005 16:18:09 -0000
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     05/02/25 08:18:09

  Modified:    lib/Qpsmtpd SMTP.pm
  Log:
  *   lib/Qpsmtpd/SMTP.pm
      Require a domain/address be given in HELO or EHLO command
  
  Revision  Changes    Path
  1.50      +4 -0      qpsmtpd/lib/Qpsmtpd/SMTP.pm
  
  Index: SMTP.pm
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/SMTP.pm,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- SMTP.pm	30 Jan 2005 17:40:11 -0000	1.49
  +++ SMTP.pm	25 Feb 2005 16:18:08 -0000	1.50
  @@ -130,6 +130,8 @@
   
   sub helo {
     my ($self, $hello_host, @stuff) = @_;
  +  return $self->respond (501,
  +    "helo requires domain/address - see RFC-2821 4.1.1.1") unless $hello_host;
     my $conn = $self->connection;
     return $self->respond (503, "but you already said HELO ...") if $conn->hello;
   
  @@ -150,6 +152,8 @@
   
   sub ehlo {
     my ($self, $hello_host, @stuff) = @_;
  +  return $self->respond (501,
  +    "ehlo requires domain/address - see RFC-2821 4.1.1.1") unless $hello_host;
     my $conn = $self->connection;
     return $self->respond (503, "but you already said HELO ...") if $conn->hello;