I've been observing process-intensive plugins handle messages that
in the end get tossed by check_relay, and thinking that it would be
much better if check_relay was nearly the first thing we do, so
that anything getting tossed as a relay attempt doesn't get played
with by all the other plugins first.

So, the solution I'm currently implementing and propose for general
consideration, is rcpt_ok:


# this plugin simply returns OK
#
# intended to be placed at the end of the rcpt list to allow receipt
# of anything that gets through all the other tests
#
# It should be configured to be run _LAST_!

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

sub rcpt_ok {
  return (OK);
}


Then, I modifed check_relay so that wherever it was returning OK, it
returns DECLINED.

I then placed check_relay immediately after check_earlytalker, and
put rcpt_ok at the end of the RCPT list where check_relay used to be.

Seem like a good idea? Anything I'm overlooking?

It appears to be working well and is cutting down on the processing
that the server is doing.

Cheers,

Ron

Reply via email to