SMTP Constant Enumerations

SMTP_Command

SMTP Commands [*]

SMTP_ReplyCode

SMTP Reply Codes [†]

Added in version 1.10.0.

SMTP Command

Generated from pcapkit.vendor.smtp.command.Command.

class pcapkit.const.smtp.command.Command(*values)[source]

Bases: EnumRegistry, aenum.StrEnum

[Command] SMTP Command

EHLO = 'EHLO'

Extended HELLO [RFC 5321 Section 4.1.1.1]

HELO = 'HELO'

HELLO [RFC 5321 Section 4.1.1.1]

MAIL = 'MAIL'

MAIL [RFC 5321 Section 4.1.1.2]

RCPT = 'RCPT'

RECIPIENT [RFC 5321 Section 4.1.1.3]

DATA = 'DATA'

DATA [RFC 5321 Section 4.1.1.4]

RSET = 'RSET'

RESET [RFC 5321 Section 4.1.1.5]

VRFY = 'VRFY'

VERIFY [RFC 5321 Section 4.1.1.6]

EXPN = 'EXPN'

EXPAND [RFC 5321 Section 4.1.1.7]

HELP = 'HELP'

HELP [RFC 5321 Section 4.1.1.8]

NOOP = 'NOOP'

NOOP [RFC 5321 Section 4.1.1.9]

QUIT = 'QUIT'

QUIT [RFC 5321 Section 4.1.1.10]

classmethod get(key, default=NO_DEFAULT)[source]

Resolve key to a member, folding a str to upper case.

Command verbs are not case-sensitive (RFC 5321 Section 2.4), and each member is named, and valued, its verb in upper case.

Parameters:
  • key (Any) – Key to get enum item.

  • default (Any) – An already-registered value to fall back to, as get() takes it.

Return type:

Command

Returns:

The member key names or carries.

Raises:
classmethod _validate_value(value)[source]

Reject value unless it is a str, as _missing_() does.

Parameters:

value (Any) – Value about to be looked up or minted.

Raises:

EnumValueError – If value is not a str.

classmethod _missing_(value)[source]

Lookup function used when value is not found.

Parameters:

value (str) – Value to get enum item, matched case-insensitively against the member names (RFC 5321 Section 2.4). A verb no member names resolves to an unregistered member named after it in upper case and valued as given (#860).

Return type:

Command

SMTP Reply Code

Generated from pcapkit.vendor.smtp.reply_code.ReplyCode.

class pcapkit.const.smtp.reply_code.ReplyCode(*values)[source]

Bases: EnumRegistry, aenum.IntEnum

[ReplyCode] SMTP Reply Code

CODE_211 = 211

System status, or system help reply [RFC 5321 Section 4.2.3]

CODE_214 = 214

Help message [RFC 5321 Section 4.2.3]

CODE_220 = 220

<domain> Service ready [RFC 5321 Section 4.2.3]

CODE_221 = 221

<domain> Service closing transmission channel [RFC 5321 Section 4.2.3]

CODE_250 = 250

Requested mail action okay, completed [RFC 5321 Section 4.2.3]

CODE_251 = 251

User not local; will forward to <forward-path> [RFC 5321 Section 4.2.3]

CODE_252 = 252

Cannot VRFY user, but will accept message and attempt delivery [RFC 5321 Section 4.2.3]

CODE_354 = 354

Start mail input; end with <CRLF>.<CRLF> [RFC 5321 Section 4.2.3]

CODE_421 = 421

<domain> Service not available, closing transmission channel [RFC 5321 Section 4.2.3]

CODE_450 = 450

Requested mail action not taken: mailbox unavailable [RFC 5321 Section 4.2.3]

CODE_451 = 451

Requested action aborted: local error in processing [RFC 5321 Section 4.2.3]

CODE_452 = 452

Requested action not taken: insufficient system storage [RFC 5321 Section 4.2.3]

CODE_455 = 455

Server unable to accommodate parameters [RFC 5321 Section 4.2.3]

CODE_500 = 500

Syntax error, command unrecognized [RFC 5321 Section 4.2.3]

CODE_501 = 501

Syntax error in parameters or arguments [RFC 5321 Section 4.2.3]

CODE_502 = 502

Command not implemented [RFC 5321 Section 4.2.3]

CODE_503 = 503

Bad sequence of commands [RFC 5321 Section 4.2.3]

CODE_504 = 504

Command parameter not implemented [RFC 5321 Section 4.2.3]

CODE_530 = 530

Authentication required [RFC 4954 Section 6][RFC 6409 Section 4.3]

CODE_550 = 550

Requested action not taken: mailbox unavailable [RFC 5321 Section 4.2.3]

CODE_551 = 551

User not local; please try <forward-path> [RFC 5321 Section 4.2.3]

CODE_552 = 552

Requested mail action aborted: exceeded storage allocation [RFC 5321 Section 4.2.3]

CODE_553 = 553

Requested action not taken: mailbox name not allowed [RFC 5321 Section 4.2.3]

CODE_554 = 554

Transaction failed [RFC 5321 Section 4.2.3]

CODE_555 = 555

MAIL FROM/RCPT TO parameters not recognized or not implemented [RFC 5321 Section 4.2.3]

classmethod _validate_value(value)[source]

Reject value unless it passes the range check _missing_() makes.

Overrides _validate_value() with that check and the message it raises, so register() refuses exactly the values get() refuses, in the same words (#1816).

Parameters:

value (Any) – Value about to be looked up or minted.

Raises:

EnumValueError – If value fails that check. A ValueError, so an except ValueError caller is unaffected.

classmethod _missing_(value)[source]

Lookup function used when value is not found.

Parameters:

value (int) – Value to get enum item.

Return type:

ReplyCode

Footnotes