Indy 9 | Content | Index | Reference

TIdPOP3ServerAPOPCommandEvent
See Also, Unit: IdPOP3Server
Event type triggered for the POP3 APOP command.

    TIdPOP3ServerAPOPCommandEvent = procedure (ASender: TIdCommand; AMailboxID :String; ADigest :String) of object;

Unit
IdPOP3Server
Parameters
ADigest
MD5 Message Digest for authentication.
AMailboxID
POP3 account name.
ASender
Client connection triggering the event.
Description
TIdPOP3ServerAPOPCommandEvent is an event type triggered during execution of the command handler for the POP3 APOP command. TIdPOP3ServerAPOPCommandEvent the type used to represent the TIdPOP3Server.OnAPOP event handler. TIdPOP3ServerAPOPCommandEvent is used to implement the alternate method of authentication which provides for both origin authentication and replay protection (APOP) for the client connection in ASender. APOP does not involve sending a password in the clear over the network.

Note: The server implementation must assign a procedure to the event handler to allow responding to the POP3 APOP command.

ASender is the TIdPOP3ServerThread generating the event notification as a result of the POP3 APOP command.

AMailboxID is the POP3 account name (or mailbox) to be accessed by the client connection.

ADigest is the 16-octet hexadecimal MD5 Message Digest calculated by applying the MD5 algorithm specified in RFC 1321 to a string consisting of the timestamp (including angle-brackets) followed by the shared APOP secret for the client connection.

The procedure assigned to the event handler is responsible for verifying that the account identified by ADigest is allowed access to the mailbox specified in AMailboxID. Use ASender to write the positive POP3 response, and set the TIdPOP3ServerState for the TIdPOP3ServerThread to Trans.

Note: The event handler will not be triggered from the APOP command handler if the TIdPOP3ServerState in ASender does not contain Auth.

A POP3 server which implements the APOP command will include a timestamp in its banner greeting. The syntax of the timestamp corresponds to the `msg-id' in RFC 822, and must be different each POP3 server banner greeting issued. For example, on a UNIX implementation in which a separate UNIX process is used for each instance of a POP3 server, the syntax of the timestamp might be:

          <process-ID.clock@hostname>

where `process-ID' is the decimal value of the process's PID, clock is the decimal value of the system clock, and hostname is the fully-qualified domain-name corresponding to the host where the POP3 server is running.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.