diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/peers mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/peers --- smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/peers 2007-01-11 20:47:28.000000000 -0700 +++ mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/peers 2007-01-11 20:46:38.000000000 -0700 @@ -48,11 +48,12 @@ my $config = shift; $qp->{hooks} = {}; my @plugins = $qp->config($config); + unshift @plugins, "peers $config"; $qp->log(LOGNOTICE, "loading plugin $_") foreach (@plugins); return $qp->_load_plugins($qp->plugin_dir, @plugins); } -sub hook_connect { +sub hook_set_hooks { my ($self, $transaction) = @_; my $qp = $self->qp; my $connection = $qp->connection; @@ -61,28 +62,20 @@ while ($client_ip) { if (-f "config/peers/$client_ip") { _peer_plugins($qp, "peers/$client_ip"); - $self->register_hook("mail", "verify_auth", 1); return (DECLINED); } $client_ip =~ s/\.?\d+$//; # strip off another 8 bits } if (-f "config/peers/0") { _peer_plugins($qp, "peers/0"); - $self->register_hook("mail", "verify_auth", 1); return (DECLINED); } return (DENY); } -sub verify_auth { - my ( $self, $transaction, $method, $user, $passClear, $passHash, $ticket ) = @_; - +sub hook_valid_auth { + my ( $self, $transaction) = @_; my $qp = $self->qp; - - if ( $qp->auth_mechanism() and $qp->auth_user() ) - { - _peer_plugins($qp, "peers/local") if (-f "config/peers/local"); - } - + _peer_plugins($qp, "peers/local") if (-f "config/peers/local"); return (DECLINED); }