from enum import Enum

SMTP_LOCAL_PART_LIMIT = 64  # RFC 5321, section 4.5.3.1.1.
SMTP_DOMAIN_LIMIT = 255  # RFC 5321, section 4.5.3.1.2.
SMTP_PATH_LIMIT = 256  # RFC 5321, section 4.5.3.1.3.
SMTP_COMMAND_LIMIT = 512  # RFC 5321, section 4.5.3.1.4.
SMTP_TEXT_LINE_LIMIT = 1000  # RFC 5321, section 4.5.3.1.6.

SYNTAX_ERROR_MSG = "Syntax error in arguments"
PATH_TOO_LONG_MSG = "Path too long"


class SMTPStatus(Enum):
    SYSTEM_STATUS = 211
    HELP_MESSAGE = 214
    SERVICE_READY = 220
    SERVICE_CLOSING = 221
    OK = 250
    WILL_FORWARD = 251
    CANNOT_VRFY = 252
    START_MAIL_INPUT = 354
    SERVICE_NOT_AVAILABLE = 421
    MAILBOX_TEMPORARILY_UNAVAILABLE = 450
    LOCAL_ERROR = 451
    INSUFFICIENT_STORAGE = 452
    UNABLE_TO_ACCOMODATE_PARAMETERS = 455
    SYNTAX_ERROR = 500
    SYNTAX_ERROR_IN_PARAMETERS = 501
    COMMAND_NOT_IMPLEMENTED = 502
    BAD_SEQUENCE = 503
    PARAMETER_NOT_IMPLEMENTED = 504
    MAILBOX_PERMANENTLY_UNAVAILABLE = 550
    TRY_FORWARDING = 551
    EXCEEDED_STORAGE_ALLOCATION = 552
    MAILBOX_NAME_NOT_ALLOWED = 553
    TRANSACTION_FAILED = 554
    MAIL_RCPT_PARAMETERS_NOT_RECOGNIZED = 555
