Internet Direct (Indy) Version 9.0.2 Beta
TIdPOP3APOPCommandEvent
Represents the event type triggered for the POP3 APOP command.

TIdPOP3APOPCommandEvent = procedure (AThread :TIdPeerThread; AMailboxID :String; ADigest :String) of object;
Description
TIdPOP3APOPCommandEvent is an event type triggered when the POP3 server receives the APOP command from the client connection in AThread. TIdPOP3APOPCommandEvent is used to implement the alternate method of authentication which provides for both origin authentication and replay protection, but which does not involve sending a password in the clear over the network.

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 time the POP3 server issues a banner greeting. 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.

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

ADigest is the 16-octet heaxdecimal 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.

When the POP3 server receives the APOP command, it verifies the digest provided. If the digest is correct, the POP3 server issues a positive response, and the POP3 session enters the POPStateTransaction state. Otherwise, a negative response is issued and the POP3 session remains in the TIdPOP3ServerState POPStateName.