user2490003
user2490003

Reputation: 11900

Breaking down the SMTP Standard

The wikipedia page on SMTP gives a good example of an exchange between Alice and Bob.

Using that as an example, I was curious about some of the specifics of how SMTP works

  1. It looks like SMTP is not a file standard, but more of a standard that describes how data is transferred from a sender to a recipient. SMTP-compliant clients can both understand the same "language" (i.e. commands) to transfer data between them. Is that a correct understanding?

  2. The DATA command describes the data sent. When I receive a message (for example, in GMail) I can view the original email in raw format and it often looks just like that. Is that a standard? Or is just a generally accepted way to format data so that clients can parse them? I'd imagine even something as simple as the date formatting could get messy.

  3. The DATA section specifies the sender and recpient. Why does this information need to specified again when it was just sent via SMTP in the two previous commands MAIL FROM: and RCPT TO: ?

Thanks!

Upvotes: 0

Views: 69

Answers (1)

jstedfast
jstedfast

Reputation: 38573

  1. Yes, that is a correct understanding.
  2. Yes, there is a standard for that. Check out rfc5322.
  3. The From, To, and Cc headers in the raw message text do not have to match the addresses specified in the MAIL FROM and RCPT TO commands. The message headers also contain more information than what is passed to MAIL FROM and RCPT TO such as the recipient names.

For more information about the SMTP protocol, you could read rfc5321.

Upvotes: 1

Related Questions