The SMTP class implements a basic SMTP server.
This is not a classic MTA. It implements all that's needed to deliver to local users, and for local users to submit messages to others. Nothing more.
This class implements SMTP as specified by RFC 2821, with the extensions specified by RFC 1651 (EHLO), RFC 1652 (8BITMIME), RFC 2487 (STARTTLS), RFC 2554 (AUTH), RFC 3030 (BINARYMIME and CHUNKING) and RFC 4468 (BURL).
Constructs an (E)SMTP server for socket s, speaking dialect.
Sets this server's authenticated user to user.
Returns the dialect used, ie. SMTP, LMTP or SMTP/Submit.
Runs all outstanding commands. When the oldest command is done, execute() removes it from the list and sends its responses to the client.
Returns the recorded HELO name, as recorded by setHeloName(). The initial value is an empty string.
Returns the current input state, which is Command initially.
Returns true if c is the oldest command in the SMTP server's queue of outstanding commands, and false if the queue is empty or there is a command older than c in the queue.
Parses the SMTP/LMTP input stream.
Reads a single SMTP/LMTP/Submit command from the client and creates an execution object for it.
Line length is limited to 4096 (for SMTP commands, not for message bodies): RFC 2821 section 4.5.3 says 512 is acceptable and various SMTP extensions may increase it. RFC 2822 declares that line lengths should be limited to 998 characters.
Returns a pointer to the list of addresses the currently authenticated User is permitted to use, or a null pointer if the list is not yet known.
Returns a list of all valid SmtpRcptTo commands. This is never a null pointer, but may be an empty list.
Resets most transaction variables, so a new mail from/rcpt to/data cycle can begin. Leaves the heloName() untouched, since some clients do not resend helo/ehlo/lhlo.
Records b for later recall. reset() clears this.
Records that the client claims to be called name. name isn't used for anything, just logged and recorded in any received fields generated.
Notifies this SMTP server that its input state is now s. If the state is anything other than Command, the SMTP server calls the last SmtpCommand every time there's more input. Eventually, the SmtpCommand has to call setInputState( Command ) again.
Uses id as transaction id for this message. Reset by rset. Used for debugging.
Records the current time, now. The rest of the SMTP transaction will be considered to happen at the specified time. Used for debugging, when we want mail to be injected at known times.
Returns a pointer to the Sieve that manages local delivery for this SMTP server.
Return an ESMTP id, either based on an internal algorithm or on something the client specified using an Archiveopteryx-specific extension.
This function returns the same ID even if called several times. Rset resets it.
Returns the current time and date, except that if you call it more than once for the same object, it returns the same value.
Returns a pointer to the authenticated user, or a null pointer if the connection is unauthenticated.
This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.