SMTP-specific ABNF parsing functions.
This subclass of AbnfParser provides functions to parse SMTP protocol elements as defined in RFC 2821.
Creates a new SmtpParser object for the string s, which is assumed to be a complete SMTP command line (not including the terminating CRLF), as received from the client.
Returns a pointer to an address, which is never a null pointer but may point to a somewhat strange address if there is a parse error.
Returns the atom production from RFC 2821 and RFC 2822. (atext from 2822, atom from 2821.)
Returns an SMTP cmmand, always in lower case.
Parses and returns a domain. The domain literal form is somewhat too flexible (read: totally botched).
As a hack, a final "." is overlooked if the next character is a ">", as in "rcpt to: <email@example.com.>".
Returns an RFC 2821 dot-string.
Parses and returns an ESMTP parameter name: esmtp-keyword = (ALPHA / DIGIT) *(ALPHA / DIGIT / "-")
Always returns lower case.
Parses an ESMTP parameter value: esmtp-value = 1*(%d33-60 / %d62-127)
Returns a quoted-string as defined in RFC 2822 (and used in RFC 2821). Does not enforce the ASCII-only rule.
Returns the RFC 2821 sub-domain production: sub-domain = Let-dig [Ldh-str]
This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.