SMTP

From Leo's Notes
Last edited on 15 June 2020, at 00:09.

Simple Mail Transport Protocol (SMTP)

Other[edit | edit source]

Transport Example[edit | edit source]

A client may send the following to a SMTP server.

EHLO mail.steamr.com
MAIL FROM:<dude@steamr.com>
RCPT TO:<alex@steamr.com>
DATA
From: "Cool Dude" <dude@example.com>
To: "Mister Alex" <alex@steamr.com>
Cc: alice@steamr.com
Date: Mon, 23 Sept 2019 22:19:00 -0600
Subject: Hello

Hello.

This is a test message

Bye!
.
QUIT

HELO vs. EHLO[edit | edit source]

The greeting used by SMTP is typically a HELO or ELHO. HELO is defined in RFC 821, published back in 1982 when mail was actually simple and without additional protocols and mechanisms like TLS or odd authentication schemes. EHLO is defined in RFC 2821 which was published in 2001 with the expectation that the response contains multiple lines containing keywords and parameters.

With the new RFC 2821, clients are expected to use the newer ELHO command and servers are expected to support both.

Example output from both HELO and ELHO. (As per the RFC, keywords are case-insensitive).

helo vps.steamr.com
250 vps.steamr.com Hello vps.steamr.com [::1]

ehlo vps.steamr.com
250-vps.steamr.com Hello vps.steamr.com [::1]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP


See: