File: authdeny

package info (click to toggle)
qpsmtpd 0.94-8
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,340 kB
  • sloc: perl: 17,176; sh: 543; makefile: 186; sql: 100
file content (23 lines) | stat: -rw-r--r-- 475 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!perl -w

=head1 NAME

authdeny

=head1 SYNOPSIS

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!!!

=cut

sub hook_auth {
    my ($self, $transaction, $method, $user, $passClear, $passHash, $ticket) =
      @_;

    $self->log(LOGWARN, "fail: cannot authenticate");

    return (DECLINED, "$user is not free to abuse my relay");
}