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

Reply via email to