SMTP Overview Tidbit

In this tidbit I will cover the Simple Mail Transfer Protocol (SMTP).

SMTP servers listen on TCP port 25.

An overview of SMTP terminologies are as follows:

  • Mail Transfer Agent (MTA) <--> Mail gateway or software agent transferring email

  • DNS MX (mail exchange) record : dns record stating how emails are routed. MX record points to servers that should receive email on behalf of domain

  • SMTP client : initiates

  • SMTP Server: receives connection request from SMTP client

  • Mail User Agent : software client application like outlook that accesses a groupware server to send/receive email

An overview of a typical SMTP conversation is as follows:

Note: Each stage is initiated via the client

  • Client connects to server <--> SMTP Server responds with 220 HELO there

  • HELP <client-hostname> <--> SMTP server responds with 250 Pleased to meet you

  • MAIL FROM: <sender ip> <--> SMTP server responds 250 OK

  • RCPT TO: <receiving addr> <--> 250 OK

  • DATA <--> SMTP server responds 354 Start mail input

  • Client sends message & ends with a '.' <--> 250 OK, accepted for delivery

The . (period) on one line indicates the end of data transmission

Overview of transfer commands:

  • Extended HELLO (EHLO) & HELLO (HELO) = used for client identification to smtp server

  • MAIL FROM = initiate mail transaction

  • RCPT TO = used to identify receiver

  • DATA = mail data to be appended to buffer

  • QUIT = specifies that the receiver must send OK reply to close channel

SMTP response codes:

  • 2 = Success (250 OK)

  • 3 = Okay so far (354 start mail input)

  • 4 = Temp failure (452 mailbox full)

  • 5 = permenant failure (550 user unknown)

SMTP Reply Codes:

  • 220 = Server ready

  • 250 = OK

  • 452 = too many recipients

That wraps up this SMTP tidbit. Cheers!


Recent Posts

See All

In this tidbit I want to cover some high level notes on general trustsec items as well as some good-to-knows. A brief overview of what trustsec is: TrustSec provides scalable access controls by uniqu

In this tidbit I will cover some ESA nice-to-know CLI commands & their purposes: > status = view counters/gauges; counters are a total of various events in the system; gauges show current utilization