Rename Qpsmtpd::Auth to README.authentication.
Replace tabs with spaces in a few plugins. git-svn-id: https://svn.perl.org/qpsmtpd/trunk@606 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
654179e8c8
commit
29d739b009
@ -1,8 +1,10 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# read this with 'perldoc README.authentication' ...
|
||||
#
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Qpsmtpd::Auth - Authentication framework for qpsmtpd
|
||||
Authentication framework for qpsmtpd
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@ -15,7 +17,7 @@ for more details.
|
||||
|
||||
=head1 USAGE
|
||||
|
||||
This module is automatically loaded by Qpsmtpd::SMTP only if a plugin
|
||||
This code is automatically loaded by Qpsmtpd::SMTP only if a plugin
|
||||
providing one of the defined L<Auth Hooks> is loaded. The only
|
||||
time this can happen is if the client process employs the EHLO command to
|
||||
initiate the SMTP session. If the client uses HELO, the AUTH command is
|
||||
@ -30,14 +32,14 @@ All plugins must provide two functions:
|
||||
|
||||
=over 4
|
||||
|
||||
=item * register()
|
||||
=item * init()
|
||||
|
||||
This is the standard function which is called by qpsmtpd for any plugin
|
||||
listed in config/plugins. Typically, an auth plugin should register at
|
||||
least one hook, like this:
|
||||
|
||||
|
||||
sub register {
|
||||
sub init {
|
||||
my ($self, $qp) = @_;
|
||||
|
||||
$self->register_hook("auth", "authfunction");
|
||||
@ -205,7 +207,7 @@ John Peacock <jpeacock@cpan.org>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (c) 2004 John Peacock
|
||||
Copyright (c) 2004-2006 John Peacock
|
||||
|
||||
Portions based on original code by Ask Bjoern Hansen and Guillaume Filion
|
||||
|
||||
@ -213,5 +215,3 @@ This plugin is licensed under the same terms as the qpsmtpd package itself.
|
||||
Please see the LICENSE file included with qpsmtpd for details.
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
@ -7,13 +7,6 @@ our $MAILS_RECEIVED = 0;
|
||||
our $MAILS_REJECTED = 0;
|
||||
our $MAILS_TEMPFAIL = 0;
|
||||
|
||||
sub register {
|
||||
my ($self) = @_;
|
||||
|
||||
$self->register_hook('deny', 'increment_deny');
|
||||
$self->register_hook('queue', 'increment_mails');
|
||||
}
|
||||
|
||||
sub get_stats {
|
||||
my $class = shift;
|
||||
my $uptime = $class->uptime;
|
||||
@ -29,7 +22,7 @@ sub get_stats {
|
||||
$uptime, $recvd, $reject, $soft, $rate);
|
||||
}
|
||||
|
||||
sub increment_deny {
|
||||
sub hook_deny {
|
||||
my ($self, $tran, $plugin, $level) = @_;
|
||||
|
||||
if ($level == DENY or $level == DENY_DISCONNECT) {
|
||||
@ -42,7 +35,7 @@ sub increment_deny {
|
||||
return DECLINED;
|
||||
}
|
||||
|
||||
sub increment_mails {
|
||||
sub hook_mail {
|
||||
my $self = shift;
|
||||
|
||||
$MAILS_RECEIVED++;
|
||||
|
Loading…
Reference in New Issue
Block a user