develooper Front page | perl.qpsmtpd | Postings from June 2005

Re: NOT reject authenicated users?

Thread Previous | Thread Next
From:
Hans Sandsdalen
Date:
June 27, 2005 03:44
Subject:
Re: NOT reject authenicated users?
Message ID:
42BFD860.9070505@spacetec.no
Hi

Had a problem like this one in dnsbl in greylisting as well. I changed 
the code in rcpt_handler from:

   # Check greylisting
   my $sender = $transaction->sender;
   my ($status, $msg) = $self->denysoft_greylist($transaction, $sender, 
$rcpt, $c
onfig);
   if ($status == DENYSOFT) {
     # Deny here (per-rcpt) unless this is a <> sender, for smtp probes
     return DENYSOFT, $msg if $sender->address;
     $transaction->notes('denysoft_greylist', $msg);
   }
   return DECLINED;

to:

   # Check greylisting
   my $sender = $transaction->sender;
   my ($status, $msg) = $self->denysoft_greylist($transaction, $sender, 
$rcpt, $c
onfig);
   my $connection = $self->qp->connection;			# added
   if ( $connection->relay_client() ) {				# added
      $self->log(LOGWARN, "relay/auth clients are ok");		# added
      return DECLINED;						# added
   }								# added
   if ($status == DENYSOFT) {
     # Deny here (per-rcpt) unless this is a <> sender, for smtp probes
     return DENYSOFT, $msg if $sender->address;
     $transaction->notes('denysoft_greylist', $msg);
   }
   return DECLINED;


Does this make sense? It seems as if it works for me...
-- 
/---------------------------------
/ Hans Sandsdalen - System Manager
/ http://www.spacetec.no
/ http://www.sandsdalen.net
/---------------------------------


Thread Previous | Thread Next


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