Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Mail.POP3Transport

THE POP3 HALF OF StreamSec.Mail.Transport, and the exact counterpart of
  StreamSec.Mail.SMTPTransport. Everything that moves octets, performs the
  handshake, bounds a peer and reaps a thread is in that unit; what is here is
  what is POP3 and could not honestly be anything else:

    - the ports, 110 and 995;
    - RFC 1939 sec.3's TEN-minute floor for the autologout timer, which is not
      RFC 5321's five and not RFC 3501's thirty;
    - admission caps sized for a mailbox client rather than a sending MTA. A
      POP3 session holds an EXCLUSIVE maildrop lock, so a second one from the
      same peer is refused by the store anyway - after paying for an Argon2id
      derivation, which is the thing worth not paying eight times;
    - the four per-protocol classes, because a listener IS its port.

  THE INTERFACES DESCEND AND CARRY THEIR OWN GUIDs, so a POP3 channel does not
  satisfy iSmtpChannel and vice versa. Delphi's QueryInterface does not walk
  interface ancestry, which is what makes that separation real rather than
  decorative.

Feature notes: Mail subsystem notes (SMTP / POP3 / IMAP)

Classes, interfaces and records

classePop3TransportError

inherits from eMailTransportError

(no public members)

classtPop3ListenerOptions

(no public members)

interfaceiPop3Channel

inherits from iMailChannel

What a POP3 conversation sees of its transport. No members of its own - the contract is the base's; this exists so the type a POP3 handler is given says POP3, and so an SMTP channel cannot satisfy it.

(no public members)

interfaceiPop3ConnectionHandler

inherits from iMailConnectionHandler

(no public members)

interfaceiPop3ConnectionFactory

inherits from iMailConnectionFactory

Mints a handler per accepted POP3 connection; the server component implements it. Both parameters typed for the same reason the SMTP factory types its own - a neutral signature would put an interface cast and an unchecked class cast on the accept path.

function NewHandler(const aChannel: iPop3Channel; aOptions: tPop3ListenerOptions): iPop3ConnectionHandler;

classtPop3Channel

inherits from tMailChannel

implements iPop3Channel

ONE POP3 CONNECTION'S OCTETS. It will not stay empty: RETR pushes whole messages through the blocked-write path, where SMTP only ever pushes short replies, and that is where a cumulative send bound belongs when one is added.

(no public members)

classtPop3ListenerOptions

inherits from tMailListenerOptions

WHAT A POP3 PORT IS, on top of what a bound socket is.

constructor Create(aOwner: TPersistent); override; property MaxConnections default cPop3TransportMaxConnections;
REDECLARED ONLY TO CARRY THIS PROTOCOL'S defaults - the base deliberately declares none, because `default` is only correct beside the constructor that produces the value, and that constructor is this one.
property MaxConnectionsPerPeer default cPop3TransportMaxPerPeer; property IdleTimeoutSeconds default cPop3TransportIdleSeconds; property SessionTimeoutSeconds default cPop3TransportSessionSeconds; property PreambleIdleSeconds default cPop3TransportPreambleIdleSeconds; property PreambleSessionSeconds default cPop3TransportPreambleSessionSeconds; property PreamblePressurePercent default cPop3TransportPreamblePressurePercent;

classtPop3Listener

(no public members)

classtPop3ConnectionThread

inherits from tMailConnectionThread

The POP3 driver. It overrides exactly two things: who answers a connection, and what this protocol calls the upgrade in a log line - POP3 spells it STLS, and a log that says STARTTLS sends somebody to the wrong RFC.

(no public members)

classtPop3Listener

inherits from tMailListener

ONE BOUND POP3 PORT.

constructor Create(aOptions: tPop3ListenerOptions; const aFactory: iPop3ConnectionFactory; aEngine: TsmSimpleTLSInternalServer); reintroduce; property Options: tPop3ListenerOptions read fPop3Options;
Typed views of what the base holds protected. Both are needed rather than decorative: protected on another class in another unit is unreachable from tPop3ConnectionThread, which is not a descendant of the listener. Kept as fields set from the constructor's own parameters, so no cast can be wrong.
property Factory: iPop3ConnectionFactory read fPop3Factory;