E-MailRelay
Classes | Public Types | Static Public Member Functions | List of all members
GSmtp::ServerParser Class Reference

A static mix-in class for GSmtp::ServerProtocol to do SMTP command parsing. More...

#include <gsmtpserverparser.h>

+ Inheritance diagram for GSmtp::ServerParser:

Classes

struct  AddressCommand
 mail-from or rcpt-to More...
 

Public Types

enum class  MailboxStyle { Invalid , Ascii , Utf8 }
 

Static Public Member Functions

static MailboxStyle mailboxStyle (const std::string &mailbox)
 Classifies the given mailbox name. More...
 
static AddressCommand parseMailFrom (G::string_view)
 Parses a MAIL-FROM command. More...
 
static AddressCommand parseRcptTo (G::string_view)
 Parses a RCPT-TO command. More...
 
static std::pair< std::size_t, bool > parseBdatSize (G::string_view)
 Parses a BDAT command. More...
 
static std::pair< bool, bool > parseBdatLast (G::string_view)
 Parses a BDAT LAST command. More...
 
static std::string parseHeloPeerName (const std::string &)
 Parses the peer name from an HELO/EHLO command. More...
 
static std::string parseVrfy (const std::string &)
 Parses a VRFY command. More...
 

Detailed Description

A static mix-in class for GSmtp::ServerProtocol to do SMTP command parsing.

Also provides mailboxStyle() to check a mailbox's character-set.

See also RFC-5321 4.1.2.

Definition at line 40 of file gsmtpserverparser.h.

Member Enumeration Documentation

◆ MailboxStyle

enum class GSmtp::ServerParser::MailboxStyle
strong

Definition at line 43 of file gsmtpserverparser.h.

Member Function Documentation

◆ mailboxStyle()

GSmtp::ServerParser::MailboxStyle GSmtp::ServerParser::mailboxStyle ( const std::string &  mailbox)
static

Classifies the given mailbox name.

See also RFC-5198.

Definition at line 30 of file gsmtpserverparser.cpp.

◆ parseBdatLast()

std::pair< bool, bool > GSmtp::ServerParser::parseBdatLast ( G::string_view  bdat_line)
static

Parses a BDAT LAST command.

Definition at line 63 of file gsmtpserverparser.cpp.

◆ parseBdatSize()

std::pair< std::size_t, bool > GSmtp::ServerParser::parseBdatSize ( G::string_view  bdat_line)
static

Parses a BDAT command.

Definition at line 47 of file gsmtpserverparser.cpp.

◆ parseHeloPeerName()

std::string GSmtp::ServerParser::parseHeloPeerName ( const std::string &  line)
static

Parses the peer name from an HELO/EHLO command.

Definition at line 263 of file gsmtpserverparser.cpp.

◆ parseMailFrom()

GSmtp::ServerParser::AddressCommand GSmtp::ServerParser::parseMailFrom ( G::string_view  line)
static

Parses a MAIL-FROM command.

Definition at line 77 of file gsmtpserverparser.cpp.

◆ parseRcptTo()

GSmtp::ServerParser::AddressCommand GSmtp::ServerParser::parseRcptTo ( G::string_view  line)
static

Parses a RCPT-TO command.

Definition at line 102 of file gsmtpserverparser.cpp.

◆ parseVrfy()

std::string GSmtp::ServerParser::parseVrfy ( const std::string &  line_in)
static

Parses a VRFY command.

Definition at line 241 of file gsmtpserverparser.cpp.


The documentation for this class was generated from the following files: