From f5a0a0998a02e2dea1a8f41de3b5fe1a6367e346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Wed, 30 Jun 2004 09:23:12 +0000 Subject: [PATCH] remove old auth prototype plugin git-svn-id: https://svn.perl.org/qpsmtpd/trunk@254 958fd67b-6ff1-0310-b445-bb7760255be9 --- plugins/saslauth | 57 ------------------------------------------------ 1 file changed, 57 deletions(-) delete mode 100644 plugins/saslauth diff --git a/plugins/saslauth b/plugins/saslauth deleted file mode 100644 index 0813866..0000000 --- a/plugins/saslauth +++ /dev/null @@ -1,57 +0,0 @@ - -# -# This plugin doesn't work at all yet! Really; it's not even a -# prototype. More like a skeleton with no bones. Patches welcome. -# - -=pod - -TODO: - - After an AUTH command has successfully completed, no more AUTH - commands may be issued in the same session. After a successful - AUTH command completes, a server MUST reject any further AUTH - commands with a 503 reply. - - The AUTH command is not permitted during a mail transaction. - - If the client wishes to cancel an authentication exchange, it issues a line - with a single "*". If the server receives such an answer, it - MUST reject the AUTH command by sending a 501 reply. - -=cut - - -sub register { - my ($self, $qp) = @_; - $self->register_hook("ehlo", "ehlo"); - $self->register_hook("unrecognized_command", "auth"); -} - -sub ehlo { - my ($self, $transaction, $host) = @_; - $transaction->notes('capabilities'); # or - $transaction->notes('capabilities', []); - my $capabilities = $transaction->notes('capabilities'); - push @{$capabilities}, 'AUTH PLAIN LOGIN DIGEST-MD5 PLAIN'; -} - -sub auth { - my ($self, $transaction, $command) = @_; - return DECLINED unless $self->{expecting_response} or $command eq "auth"; - - if ($command eq "auth") { - warn "COMMAND: $command"; - $self->qp->respond(334, "VXNlcm5hbWU6"); - $self->{expecting_response} = $self->qp->command_counter; - return DONE; - } - else { - $self->{expecting_response}+1 == $self->qp->command_counter - or return DECLINED; - # check the response - $self->qp->respond(123, "Something should go here..."); - return DONE; - } -} -