SMTP is the de facto standard for electronic mail transport across the Internet. SMTP is independent of the particular transmission subsystem and requires only a reliable ordered data stream channel. When you send an email message, SMTP packages your message in a kind of envelope and relays it to its destination. Multiple servers are often involved in the transport of the message, and as it passes through them, each one time-stamps and tags it. Thus, when the message arrives, the recipient can get an idea of where it's been, and when it was sent. SMTP also handles error messages, sending notifications to senders when there is difficulty delivering their mail.
An SMTP server is a computer that receives outgoing mail messages from users and routes them to their intended recipients. All SMTP servers implement some version of the Simple Mail Transport Protocol, and many that run Unix use the sendmail program. Messages often must pass through several servers to reach their destinations, and SMTP facilitates this.
An important feature of SMTP is its capability to relay mail across transport service environments. A transport service provides an interprocess communication environment (IPCE). An IPCE may cover one network, several networks, or a subset of a network. It is important to realize that transport systems (or IPCEs) are not one-to-one with networks. A process can communicate directly with another process through any mutually known IPCE. Mail is an application or use of interprocess communication. Mail can be communicated between processes in different IPCEs by relaying through a process connected to two (or more) IPCEs. More specifically, mail can be relayed between hosts on different transport systems by a host on both transport systems.
The SMTP design is based on the following model of communication: as the result of a user mail request, the sender-SMTP establishes a full-duplex transmission channel to a receiver-SMTP. The receiver-SMTP may be either the ultimate destination or an intermediate. SMTP commands are generated by the sender-SMTP and sent to the receiver-SMTP. SMTP replies are sent from the receiver-SMTP to the sender-SMTP in response to the commands.
Once the transmission channel is established, the SMTP-sender sends a MAIL command indicating the sender of the mail. If the SMTP-receiver can accept mail it responds with an OK reply. The SMTP-sender then sends a RCPT command identifying a recipient of the mail. If the SMTP-receiver can accept mail for that recipient it responds with an OK reply; if not, it responds with a reply rejecting that recipient (but not the whole mail transaction). The SMTP-sender and SMTP-receiver may negotiate several recipients. When the recipients have been negotiated the SMTP-sender sends the mail data, terminating with a special sequence. If the SMTP-receiver successfully processes the mail data it responds with an OK reply. The dialog is purposely lock-step, one-at-a-time.
Difference Between SMTP and POP
There are two standards currently used for most e-mail sent today. SMTP stands for simple mail transfer protocol. POP is an acronym Post Office Protocol. Though it may sound confusing, the difference is not hard to understand. POP is a protocol for storage of email. SMTP is a protocol for sending and receiving.
To give a real-world illustration, SMTP would be like a letter carrier or mailman. He or she can deliver or pick up mail for transfer to another location. POP is like a mailbox or Post Office Box. It is the location the mail is delivered to and where it stays until the recipient is ready to read it. Outgoing mail can also be put in the mailbox. SMTP is the standard by which the vast majority of mail of transferred on the Internet. Though invented in the early 1980s, it has a reputation for being very reliable. Most mail goes through without problems and gets to the recipient quickly.
Scope of SMTP Servers
It is a well-established principle that an SMTP server may refuse to accept mail for any operational or technical reason that makes sense to the site providing the server. However, cooperation among sites and installations makes the Internet possible. If sites take excessive advantage of the right to reject traffic, the ubiquity of email availability will be threatened; considerable care should be taken and balance maintained if a site decides to be selective about the traffic it will accept and process.
In recent years, use of the relay function through arbitrary sites has been used as part of hostile efforts to hide the actual origins of mail. Some sites have decided to limit the use of the relay function to known or identifiable sources, and implementations SHOULD provide the capability to perform this type of filtering. When mail is rejected for these or other policy reasons, a 550 code SHOULD be used in response to EHLO, MAIL, or RCPT as appropriate.