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

Re: NOT reject authenicated users?

Thread Previous | Thread Next
From:
John Peacock
Date:
June 8, 2005 07:49
Subject:
Re: NOT reject authenicated users?
Message ID:
42A7057E.6020300@rowman.com
Matt Sergeant wrote:
> Then my suggestion to you would be to have a meta plugin that calls the 
> other plugins. Robert patched so that it was easy to run other plugins.

The other [better] option is a simple "connect" plugin which runs after 
relay_check and any auth hooks and simply returns 'OK' if 
$connection->relay_client() is true (don't look inside the $connection 
object, please).  Something like this (not tested):

================================
# add to config/plugins after both relay_check and auth hooks
# but before any other "connect" hook plugins like dnsbl

sub register {
   my ($self, $qp) = @_;
   $self->register_hook("connect", "relay_ok");
}

sub relay_ok {
   my ($self, $transaction) = @_;

   return OK if $self->qp->connection->relay_client();
   return DECLINED;
}
================================

John

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