qpsmtpd/plugins/auth/authdeny
Robert 61de599c1b Normalize #! lines on all plugins
find . -type f | xargs -n1 perl -pi.bak -0777 -e '$want = "#!perl -Tw"; s/\A#!.*\n/$want\n/; s/\A([^#])/$want\n\1/s'
2012-04-28 20:41:31 -07:00

19 lines
482 B
Perl

#!perl -Tw
#
# This plugin doesn't actually check anything and will fail any
# user no matter what they type. It is strictly a proof of concept for
# the Qpsmtpd::Auth module. Don't run this in production!!!
#
sub hook_auth {
my ( $self, $transaction, $method, $user, $passClear, $passHash, $ticket ) =
@_;
# $DB::single = 1;
$self->log( LOGWARN, "Cannot authenticate using authdeny" );
return ( DECLINED, "$user is not free to abuse my relay" );
}