Introduction To Unix: SMTP - Simple Mail Transfer Protocol
Introduction To Unix: SMTP - Simple Mail Transfer Protocol
MIME-Version: 1.0
This is a test.
How SMTP works
The Essentials
Keyword Arguments
HELO Senders Host Domain Name
MAIL FROM: Email Address of sender
RCPT TO: Email of Intended recipient
DATA Body of the message
QUIT
TCP Connection
Establishment
Message Progress
Connection Termination
Professor Richards,
By department decree all students in your Introduction to
Unix class are hereby to be granted automatic As.
Thank you,
Dr. Art Zenner
.
QUIT
Extensions to SMTP
MIME Multipurpose Internet Mail Extensions
Transforms non-ASCII data to NVT (Network Virtual Terminal)
ASCII data
Text
Application
Image
Audio
Video
MIME and Base64 Encoding
If the internet is the information
highway, then the path for email is a
narrow tunnel
Only very small vehicles can pass trough
Then how do you send a big truck
through a small ravine?
You have to break it down to smaller
pieces and transport the pieces through
the ravine, and reassemble the truck
MIME and Base64 Encoding
The same happens when you send a file
attachment via email.
This is known as encoding
the binary data (256 bits) is transformed to
ASCII text (128 bits
allowing it to fit through the tunnel
On the recipient's end, the data is
decoded and the original file is rebuilt.
Mail Transfer Agents (MTA)
MTAs do the actual mail transfers
MTAs are not meant to be directly
accessed by users.
Other MTAs are:
Postfix
Qmail
MS Exchange
CC:Mail
Lotus Notes
.etc.
Problems with simple SMTP
The first one relates to message length. Some older
implementations cannot handle messages exceeding
64KB.
Another problem relates to timeouts. If the Client and
server have different timeouts, one of them may give
up while the other is still busy, unexpectedly
terminating the connection.
Infinite mail storms can be triggered. For example, If
host 1 holds mailing list A and host 2 holds mailing list B
and each list contains an entry for the other one, then a
message sent to either list could generate a never
ending amount of email traffic unless somebody checks
for it.
ESMTP (RFC 2821)
To get around the problems with simple
SMTP, extended SMTP has been defined in
RFC 2821.
Clients wanting to use it should send an EHLO
message instead of HELO initially. If this is
rejected, then the server is a regular SMTP
server, and the client should proceed in the
usual way. If the EHLO is accepted, then new
commands and parameters are allowed.