74a5b704b0
rename authsql to auth_vpopmail_sql -- we need a generic "connect to database" thing with a generic way to configure databases. ... and then we should have a more generic "check username with sql" plugin. git-svn-id: https://svn.perl.org/qpsmtpd/trunk@253 958fd67b-6ff1-0310-b445-bb7760255be9
28 lines
748 B
Perl
28 lines
748 B
Perl
#!/usr/bin/perl
|
|
#
|
|
# This plugin doesn't actually check anything and will authenticate 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 register {
|
|
my ( $self, $qp ) = @_;
|
|
|
|
# $self->register_hook("auth-plain", "authnull");
|
|
# $self->register_hook("auth-login", "authnull");
|
|
# $self->register_hook("auth-cram-md5", "authnull");
|
|
|
|
$self->register_hook( "auth", "authnull" );
|
|
}
|
|
|
|
sub authnull {
|
|
my ( $self, $transaction, $method, $user, $passClear, $passHash, $ticket ) =
|
|
@_;
|
|
|
|
# $DB::single = 1;
|
|
$self->log( LOGERROR, "authenticating $user using $method" );
|
|
|
|
return ( OK, "$user is free to abuse my relay" );
|
|
}
|
|
|