Fix plugin docs to reflect reality
Re-order plugin docs to appear in the order things generally get called Fix SMTP.pm to reflect what's documented in README.plugins :-) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@471 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
6e01a45b0f
commit
71f6fc1dff
@ -32,10 +32,15 @@ Action denied
|
||||
|
||||
Action denied; return a temporary rejection code (say 450 instead of 550).
|
||||
|
||||
=item DENYHARD
|
||||
=item DENY_DISCONNECT
|
||||
|
||||
Action denied; return a permanent rejection code and disconnect the client.
|
||||
Use this for "rude" clients.
|
||||
Use this for "rude" clients. Note that you're not supposed to do this
|
||||
according to the SMTP specs, but bad clients don't listen sometimes.
|
||||
|
||||
=item DENYSOFT_DISCONNECT
|
||||
|
||||
Action denied; return a temporary rejection code and disconnect the client.
|
||||
|
||||
=item DECLINED
|
||||
|
||||
@ -68,6 +73,43 @@ completely finished (e.g. after the child process has ended in forkserver).
|
||||
The hook doesn't have a predefined additional input value, but one can be
|
||||
passed as a hash of name/value pairs.
|
||||
|
||||
|
||||
=head2 connect
|
||||
|
||||
Allowed return codes:
|
||||
|
||||
OK - Stop processing plugins, give the default response
|
||||
DECLINED - Process the next plugin
|
||||
DONE - Stop processing plugins and don't give the default response
|
||||
DENY - Return hard failure code and disconnect
|
||||
DENYSOFT - Return soft failure code and disconnect
|
||||
|
||||
Note: DENY_DISCONNECT and DENYSOFT_DISCONNECT are not supported here due to
|
||||
them having no meaning beyond what DENY and DENYSOFT already do.
|
||||
|
||||
|
||||
=head2 helo
|
||||
|
||||
Called on "helo" from the client.
|
||||
|
||||
DENY - Return a 550 code
|
||||
DENYSOFT - Return a 450 code
|
||||
DENY_DISCONNECT & DENYSOFT_DISCONNECT - as above but with disconnect
|
||||
DONE - Qpsmtpd won't do anything; the plugin sent the message
|
||||
DECLINED - Qpsmtpd will send the standard HELO message
|
||||
|
||||
|
||||
=head2 ehlo
|
||||
|
||||
Called on "ehlo" from the client.
|
||||
|
||||
DENY - Return a 550 code
|
||||
DENYSOFT - Return a 450 code
|
||||
DENY_DISCONNECT & DENYSOFT_DISCONNECT - as above but with disconnect
|
||||
DONE - Qpsmtpd won't do anything; the plugin sent the message
|
||||
DECLINED - Qpsmtpd will send the standard HELO message
|
||||
|
||||
|
||||
=head2 mail
|
||||
|
||||
Called right after the envelope sender address is passed. The plugin
|
||||
@ -79,7 +121,7 @@ Allowed return codes
|
||||
OK - sender allowed
|
||||
DENY - Return a hard failure code
|
||||
DENYSOFT - Return a soft failure code
|
||||
DENYHARD - Return a hard failure code and disconnect
|
||||
DENY_DISCONNECT & DENYSOFT_DISCONNECT - as above but with disconnect
|
||||
DONE - skip further processing
|
||||
|
||||
|
||||
@ -93,52 +135,45 @@ Allowed return codes
|
||||
OK - recipient allowed
|
||||
DENY - Return a hard failure code
|
||||
DENYSOFT - Return a soft failure code
|
||||
DENYHARD - Return a hard failure code and disconnect
|
||||
DENY_DISCONNECT & DENYSOFT_DISCONNECT - as above but with disconnect
|
||||
DONE - skip further processing
|
||||
|
||||
|
||||
=head2 data
|
||||
|
||||
Hook for the "data" command. Defaults to '354, "go ahead"'.
|
||||
|
||||
DENY - Return a hard failure code
|
||||
DENYSOFT - Return a soft failure code
|
||||
DENYHARD - Return a hard failure code and disconnect
|
||||
DENY_DISCONNECT & DENYSOFT_DISCONNECT - as above but with disconnect
|
||||
DONE - Plugin took care of receiving data and calling the queue (not
|
||||
recommended)
|
||||
|
||||
|
||||
=head2 data_post
|
||||
|
||||
Hook after receiving all data; just before the message is queued.
|
||||
|
||||
DENY - Return a hard failure code
|
||||
DENYSOFT - Return a soft failure code
|
||||
DENYHARD - Return a hard failure code and disconnect
|
||||
DENY_DISCONNECT & DENYSOFT_DISCONNECT - as above but with disconnect
|
||||
DONE - skip further processing (message will not be queued)
|
||||
|
||||
All other codes and the message will be queued normally
|
||||
|
||||
|
||||
=head2 queue
|
||||
|
||||
Called on completion of the DATA command.
|
||||
Called on completion of the DATA command, after the data_post hook.
|
||||
|
||||
DONE - skip further processing (plugin gave response code)
|
||||
OK - Return success message
|
||||
DENY - Return hard failure code
|
||||
DENYSOFT - Return soft failure code
|
||||
DENYHARD - Return a hard failure code and disconnect
|
||||
|
||||
Any other code will return a soft failure code.
|
||||
|
||||
|
||||
=head2 connect
|
||||
|
||||
Allowed return codes:
|
||||
|
||||
OK - Stop processing plugins, give the default response
|
||||
DECLINED - Process the next plugin
|
||||
DONE - Stop processing plugins and don't give the default response
|
||||
|
||||
|
||||
=head2 quit
|
||||
|
||||
Called on the "quit" command.
|
||||
@ -149,16 +184,6 @@ Allowed return codes:
|
||||
|
||||
Works like the "connect" hook.
|
||||
|
||||
=head2 helo
|
||||
|
||||
Called on "helo" from the client.
|
||||
|
||||
DENY - Return a 550 code
|
||||
DENYSOFT - Return a 450 code
|
||||
DENYHARD - Return a hard failure code and disconnect
|
||||
DONE - Qpsmtpd won't do anything; the plugin sent the message
|
||||
DECLINED - Qpsmtpd will send the standard HELO message
|
||||
|
||||
|
||||
=head2 unrecognized_command
|
||||
|
||||
|
@ -142,6 +142,12 @@ sub helo {
|
||||
$self->respond(550, $msg);
|
||||
} elsif ($rc == DENYSOFT) {
|
||||
$self->respond(450, $msg);
|
||||
} elsif ($rc == DENY_DISCONNECT) {
|
||||
$self->respond(550, $msg);
|
||||
$self->disconnect;
|
||||
} elsif ($rc == DENYSOFT_DISCONNECT) {
|
||||
$self->respond(450, $msg);
|
||||
$self->disconnect;
|
||||
} else {
|
||||
$conn->hello("helo");
|
||||
$conn->hello_host($hello_host);
|
||||
@ -164,6 +170,12 @@ sub ehlo {
|
||||
$self->respond(550, $msg);
|
||||
} elsif ($rc == DENYSOFT) {
|
||||
$self->respond(450, $msg);
|
||||
} elsif ($rc == DENY_DISCONNECT) {
|
||||
$self->respond(550, $msg);
|
||||
$self->disconnect;
|
||||
} elsif ($rc == DENYSOFT_DISCONNECT) {
|
||||
$self->respond(450, $msg);
|
||||
$self->disconnect;
|
||||
} else {
|
||||
$conn->hello("ehlo");
|
||||
$conn->hello_host($hello_host);
|
||||
|
Loading…
Reference in New Issue
Block a user