It's part of a pseudo-monolithic blob in my 'queue' plugin.  The jist of it
comes down to this:

sub register {
  my ($self, $qp, @args) = @_;
  $self->register_hook("queue", "queue_handler");
}

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

  return (DENYSOFT, "MX looped back to myself ($!)")
      if ($transaction->header->get('X-SpamKiller'));
  
  $transaction->header->add('X-SpamKiller', $self->qp->config('me').'
('.$$.')');
  return DECLINED;
}

In my real implementation I do more, but it's a reasonable place to start.
Obviously, this would need to be listed in config/plugins _prior_ to the
real queue.  Also, whether to deny hard or soft is up to the user.

peter

On 4/4/05 2:31 PM, "John Peacock" <[EMAIL PROTECTED]> wrote:

> Peter Eisch wrote:
>> I do it as a plugin.  It allows me to have an array of systems that all sit
>> in front of the real MTA.
> 
> That's exactly my configuration; anything I add would be smart enough to
> check for loops over multiple Received: lines.  Care to share your plugin???
> 
> John
> 


Reply via email to