Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

SMTP Simple Mail Transfer Protocol

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

SMTP(Simple Mail Transfer Protocol)

Diwaker singh
Roll-RB1803B54
Reg. No-10808015

Lovely Professional Univerity


Chhehru,Phagwara,Punjab

Abstract— went on, the limitations of this approach became more


As it is clear from the name of the topic , the topic deals with obvious.
SMTP i.e. Simple Mail Transfer Protocol, the protocol or set of
rules governing the transmission of electronic mail across ip i.e.
internet protocol networks.This is my attempt to provide all the Some of the complaints were as follows:
information as a zest or summary. I have tried to explain each
and every term associated with Simple mail Transfer Protocol as 1. Sending a message to a group of people was
far as possible. I hope that the reader will be able to know the inconvenient. Managers often need this facility to
fundamentals of Simple Mail Transfer Protocol after reading this send memos to all their subordinates.
document.
2. Messages had no internal structure, making computer
processing difficult. For example, if a forwarded
message was included in the body of another
I. INTRODUCTION
message, extracting the forwarded part from the
This document gives all the information related to the received message was difficult.
services provided by Simple Mail Transfer Protocol for 3. The originator (sender) never knew if a message
transmission of electronic mail across networks and and its arrived or not.
implementation in IP (Internet protocol). It also deals about 4. If someone was planning to be away on business for
the extensions of SMTP and its detailed analysis. several weeks and wanted all incoming e-mail to be
handled by his secretary, this was not easy to
II. EMAIL(ELECTRONIC MAIL)
arrange.
Before starting the discussion about Simple Mail Transfer 5. The user interface was poorly integrated with the
Protocol we should have basic knowledge about an electronic transmission system requiring users first to edit a file,
mail i. e. what is an electronic mail, what does it carry and then leave the editor and invoke the file transfer
how is it sent from one computer to another computer. program.
Moreover sending electronic mail using Simple Mail Transfer 6. It was not possible to create and send messages
Protocol will be of our prime concern. containing a mixture of text, drawings, facsimile, and
voice.
Electronic mail, or e-mail, as it is known to its many fans, has
been around for over two decades. Before 1990, it was mostly As experience was gained, more elaborate e-mail systems
used in academia. During the 1990s, it became known to the were proposed. In 1982, the ARPANET e-mail proposals were
public at large and grew exponentially to the point where the published as RFC 821 (transmission protocol) and RFC 822
number of e-mails sent per day now is vastly more than the (message format). Minor revisions, RFC 2821 and RFC 2822,
number of snail mail (i.e., paper) letters. have become Internet standards, but everyone still refers to
Internet e-mail as RFC 822.
E-mail, like most other forms of communication, has its own
conventions and styles. In particular, it is very informal and In 1984, CCITT drafted its X.400 recommendation. After two
has a low threshold of use. People who would never dream of decades of competition, e-mail systems based on RFC 822 are
calling up or even writing a letter to a Very Important Person widely used, whereas those based on X.400 have disappeared.
do not hesitate for a second to send a sloppily-written e-mail. How a system hacked together by a handful of computer
science graduate students beat an official international
The first e-mail systems simply consisted of file transfer standard strongly backed by all the PTTs in the world, many
protocols, with the convention that the first line of each governments, and a substantial part of the computer industry
message (i.e., file) contained the recipient's address. As time brings to mind the Biblical story of David and Goliath.
The reason for RFC 822's success is not that it is so good, but PostScript file or digitized voice. Simple conversions and
that X.400 was so poorly designed and so complex that formatting are sometimes attempted as well.
nobody could implement it well. Given a choice between a
simple-minded, but working, RFC 822-based e-mail system Disposition is the final step and concerns what the recipient
and a supposedly truly wonderful, but nonworking, X.400 e- does with the message after receiving it. Possibilities include
mail system, most organizations chose the former. Perhaps throwing it away before reading, throwing it away after
there is a lesson lurking in there somewhere. Consequently, reading, saving it, and so on. It should also be possible to
our discussion of e-mail will focus on the Internet e-mail retrieve and reread saved messages, forward them, or process
system. them in other ways.

In addition to these basic services, some e-mail systems,


especially internal corporate ones, provide a variety of
III. ARCHITECTURE AND SERVICES PROVIDED BY ELECTRONIC MAILS advanced features. Let us just briefly mention a few of these.
When people move or when they are away for some period of
time, they may want their e-mail forwarded, so the system
should be able to do this automatically.
In this section we will provide an overview of what e-mail
systems can do and how they are organized. They normally
consist of two subsystems: the user agents, which allow A key idea in e-mail systems is the distinction between the
people to read and send e-mail, and the message transfer envelope and its contents. The envelope encapsulates the
agents, which move the messages from the source to the message. It contains all the information needed for
destination. The user agents are local programs that provide a transporting the message, such as the destination address,
command-based, menu-based, or graphical method for priority, and security level, all of which are distinct from the
interacting with the e-mail system. The message transfer message itself. The message transport agents use the envelope
agents are typically system daemons, that is, processes that for routing, just as the post office does.
run in the background. Their job is to move e-mail through the
system. The message inside the envelope consists of two parts: the
header and the body. The header contains control information
Typically, e-mail systems support five basic functions. Let us for the user agents. The body is entirely for the human
take a look at them. recipient. Envelopes and messages are illustrated in following
Fig.
Composition refers to the process of creating messages and
answers. Although any text editor can be used for the body of
the message, the system itself can provide assistance with
addressing and the numerous header fields attached to each
message. For example, when answering a message, the e-mail
system can extract the originator's address from the incoming
e-mail and automatically insert it into the proper place in the
reply.

Transfer refers to moving messages from the originator to the


recipient. In large part, this requires establishing a connection
to the destination or some intermediate machine, outputting
the message, and releasing the connection. The e-mail system
should do this automatically, without bothering the user.

Reporting has to do with telling the originator what happened


to the message. Was it delivered? Was it rejected? Was it lost?
Numerous applications exist in which confirmation of
delivery is important and may even have legal significance Fig.1.-Envelopes and messages. (a) Paper mail. (b) Electronic
(''Well, Your Honor, my e-mail system is not very reliable, so mail.
I guess the electronic subpoena just got lost somewhere'').

Displaying incoming messages is needed so people can read IV. RFC882


their e-mail. Sometimes conversion is required or a special Messages consist of a primitive envelope, some number of
viewer must be invoked, for example, if the message is a header fields, a blank line, and then the message body. Each
header field (logically) consists of a single line of ASCII text other information that can be used for finding bugs in the
containing the field name, a colon, and, for most fields, a routing system.
value. RFC 822 was designed decades ago and does not
clearly distinguish the envelope fields from the header fields. The Return-Path: field is added by the final message transfer
Although it was revised in RFC 2822, completely redoing it agent and was intended to tell how to get back to the sender.
was not possible due to its widespread usage. In normal usage, In theory, this information can be gathered from all the
the user agent builds a message and passes it to the message Received: headers (except for the name of the sender's
transfer agent, which then uses some of the header fields to mailbox), but it is rarely filled in as such and typically just
construct the actual envelope, a somewhat old-fashioned contains the sender's address.
mixing of message and envelope.
In addition to the fields of Fig.2 RFC 822 messages may also
The principal header fields related to message transport are contain a variety of header fields used by the user agents or
listed in fig 2. The To: field gives the DNS address of the human recipients. The most common ones are listed in Fig.3.
primary recipient. Having multiple recipients is also allowed. Most of these are self-explanatory, so we will not go into all
The Cc: field gives the addresses of any secondary recipients. of them in detail.
In terms of delivery, there is no distinction between the
primary and secondary recipients. It is entirely a
psychological difference that may be important to the people
involved but is not important to the mail system. The term Cc:
(Carbon copy) is a bit dated, since computers do not use
carbon paper, but it is well established. The Bcc: (Blind
carbon copy) field is like the Cc: field, except that this line is
deleted from all the copies sent to the primary and secondary
recipients. This feature allows people to send copies to third
parties without the primary and secondary recipients knowing
this.
Fig.3.- Some fields used in the RFC 822 message header.

This was an overview of an electronic mail. Now we come to


our main topic I. e. Simple Mail Transfer Protocol.

V. SIMPLE MAIL TRANSFER PROTOCOL

SMTP is a relatively simple, text-based protocol, where one or


more recipients of a message are specified (and in most cases
Fig.2.-RFC 822 header fields related to message transport. verified to exist) and then the message text is transferred. It is
a client-server protocol, where the client transmits an email
message to the server. Either an end-user's email client, a.k.a.
MUA (Mail User Agent), or a relaying server's MTA (Mail
Transfer Agents) can act as an SMTP client.
The next two fields, From: and Sender: tell who wrote and
sent the message, respectively. These need not be the same. An email client knows the outgoing mail SMTP server from
For example, a business executive may write a message, but its configuration. A relaying server typically determines which
her secretary may be the one who actually transmits it. In this SMTP server to connect to by looking up the MX (Mail
case, the executive would be listed in the From: field and the eXchange) DNS record for each recipient's domain name, the
secretary in the Sender: field. The From: field is required, but part of the email address to the right of the at sign (@).
the Sender: field may be omitted if it is the same as the From: Conformant MTAs (not all) fall back to a simple A record in
field. These fields are needed in case the message is the case of no MX. Some current mail transfer agents will also
undeliverable and must be returned to the sender. use SRV records, a more general form of MX, though these
are not widely adopted. (Relaying servers can also be
A line containing Received: is added by each message configured to use a smart host.)
transfer agent along the way. The line contains the agent's The SMTP client initiates a TCP connection to server's port
identity, the date and time the message was received, and 25
(unless overridden by configuration.) It is quite easy to test an
SMTP server using the telnet program (see below). An email client requires the name or the IP address of an
SMTP is a "push" protocol that does not allow one to "pull" SMTP server as part of its configuration. The server will take
messages from a remote server on demand. To do this a mail care of delivering messages on behalf of the user. This setting
client must use POP3 or IMAP. Another SMTP server can allows for various policies and network designs. Clients from
trigger a delivery in SMTP using ETRN. behind a firewall are able to send mail to any Internet address
without directly connecting to the Internet. End-users directly
V. 1. HISTORY connected to the Internet can use the services of an e-mail
provider that is not necessarily the same as their connection
SMTP developed out of Mail Box Protocol , FTP Mail and provider. Before SMTP-AUTH was widely implemented, the
Mail Protocol.The work continued throughout the 1970s, until only practical setting for an end user or small office directly
the ARPANET converted into the modern Internet around connected to the Internet was to use the connection provider's
1990. Jon Postel then proposed a Mail Transfer Protocol in SMTP server . Nowadays, decent SMTP servers support
1980 that began to remove the mail's reliance on FTP. SMTP authentication and encrypted SMTP sessions. Even then, some
was published as RFC 821 in 1982 also by Jonathan Postel. still believe that using their connection provider’s SMTP
server for outgoing mail would result in a better overall
SMTP started becoming widely used in the early 1980s. At resource usage, because that allows to optimize the delivery
the time, it was a complement to UUCP (Unix to Unix CoPy) paths of outgoing messages. After recognizing the amount of
which was better suited to handle e-mail transfers between resources burned for delivering spam, that statement is not
machines that were intermittently connected. SMTP, on the true.
other hand, works best when both the sending and receiving Another choice is whether to use port 25 or port 587, as
machines are connected to the network all the time. Both use a established by RFC 2476. Many servers support both. Some
store and forward mechanism and are examples of push servers still support port 465 for legacy secure SMTP, it is
technology. preferable to use encryption on standard ports after RFC 2487.

The article about sender rewriting contains technical


background info about the early SMTP history and source V. 4. SAMPLE COMMUNICATIONS
routing before RFC 1123. SMTP-AUTH was introduced with After establishing a connection between the sender (the client)
RFC 2554 in 1998/99, more or less at the same time as RFC and the receiver (the server), the following is a legal SMTP
2476 that introduced Mail submission agent as a different session. In the following conversation, everything sent by the
flavour of SMTP. Until then clients could only be recognized client is prefaced with C: and everything sent by the server is
by their IP address. prefaced with S:. On most computer systems, a connection
can be established using the telnet command on the client
Sendmail was one of the first (if not the first) mail transfer machine,
agent to implement SMTP. As of 2001 there are at least 50 for example.
programs that implement SMTP as a client (sender of telnet www.example.com 25
messages) or a server (receiver of messages). Some other which opens a TCP connection from the sending machine to
popular SMTP server programs include Postfix, qmail, Novell the MTA listening on port 25 on host www.example.com.
GroupWise, Exim, Novell NetMail and Microsoft Exchange
Server. Since this protocol started out as purely ASCII text-
based, it did not deal well with binary files . Standards such as
Multipurpose Internet Mail Extensions (MIME) were
developed to encode binary files for transfer through SMTP.
MTAs developed after sendmail also tended to be
implemented 8-bit-clean, so that the alternate "just send eight"
strategy could be used to transmit arbitrary data via SMTP.
Non-8-bit-clean MTAs today tend to support the 8BITMIME
extension, permitting binary files to be transmitted almost as
easily as plain text .
V. 2. DEVELOPERS
Many people edited or contributed to the core SMTP
Specifications , among them Jon Postel , Eric Allman, Dave
Crocker, Ned Freed, Randall Gellens, John Klensin, and Keith
Moore.

V. 3. OUTGOING MAIL SMTP SERVER


Please note that the data the client sends in the HELO and implementing broken MTAs (that do not adhere to standards,
MAIL FROM commands can be retrieved in additional and therefore make it difficult for other MTAs to enforce
headers that the server adds to the message: Received and standards), security vulnerabilities within the operating system
Return-Path respectively. (often exacerbated by always-on broadband connections) that
Although optional and not shown above, nearly all clients ask allow spammers to remotely control end-user PCs and cause
the server which SMTP extensions the server supports, by them to send spam, and a regrettable lack of "intelligence" in
using the EHLO greeting to invoke Extended SMTP many MTAs still a major problem.
(ESMTP). These clients use HELO only if the server does not There are a number of proposals for sideband protocols that
respond to EHLO. will assist SMTP operation. The Anti-Spam Research Group
Contemporary clients will use the ESMTP extension keyword (ASRG) of the Internet Research Task Force (IRTF) is
SIZE to inquire of the server the maximum message size that working on a number of E-mail authentication and other
will be accepted . Older clients and servers will try to transfer proposals for providing simple source authentication that is
huge messages that will be rejected after wasting the network flexible, lightweight, and scalable. Recent Internet
resources , including a lot of connect time to dialup ISPs that Engineering Task Force (IETF) activities include MARID
are paid by the minute. (2004) leading to two approved IETF experiments in 2005,
For the edit planning of giant files or sending with older and Domain Keys Identified Mail in 2006.
clients, users can manually determine in advance the
maximum size accepted by ESMTP servers. The user telnets IV. CONCLUSIONS
as above, but substitutes "EHLO mydomain.com" for the Thus, this was all about SMTP and its working. I hope this
HELO command line. document will be helpful for anyone who doesn’t have basic
knowledge of an electronic mail. This document will make
one aware of all the mysteries related to electronic mail and its
transmission over networks.

ACKNOWLEDGMENT
As usual a large number of people deserve my thanks for the
help they provided me for the preparation of this term paper.

First of all I would like to thank my teacher Ms. MONALISA


PANIGRAHI for her support during the preparation of this
This serverdomain.com declares that it will accept a fixed topic. I am very thankful for her guidance.
maximum message size no larger than 14,680,064 octets (8-bit
bytes). Depending on the server's actual resource usage, it I would also like to thank my friends for the encouragement
may be currently unable to accept a message this large. and information about the topic they provided to me during
In the simplest case, an ESMTP server will declare a my efforts to prepare this topic.
maximum SIZE with only the EHLO user interaction. If no
number appears after the SIZE keyword, or if the current At last but not the least I would like to thank my elder brother
message limit must be exactly determined, the user can further Mr. Balwant Singh for providing me his experience and being
interact by simulating the ESMTP header of a message with with me during my work.
an estimated size.
REFERENCES
V.5.SECURITY AND SPAMMING Sites:-
1. http://en.wikipedia.org
One of the limitations of the original SMTP is that it has no 2. http://books.google.co.in
facility for authentication of senders. Therefore the Books:-
SMTPAUTH extension was defined. However, the 1. Computer Networks by Tanenbaum
impracticalities of widespread SMTP-AUTH implementation 2. Data Communication and Networking by Behrouz H.
and management means that E-mail spamming is not and Forouzan

cannot be addressed by it .
Modifying SMTP extensively, or replacing it completely, is
not believed to be practical, due to the network effects of the
huge installed base of SMTP. Internet Mail 2000 is one such
proposal for replacement.
Spam is enabled by several factors, including vendors

You might also like