Monday, June 22, 2009

SMTP

There has been much confusion as to just what SMTP applications are responsible for sending and delivering mail. I am going to try to clarify things a bit. While mail servers (mail transfer agents) use SMTP to send and receive mail messages, client mail applications normally use only SMTP for relaying messages to a mail server. For receiving messages, client applications normally use Post Office Protocol (POP) or Internet Message Access Protocol (IMAP) to access their mail box accounts on a mail server. Since SMTP is a delivery protocol only, it cannot pull messages from a remote server on demand. Because of this, POP and IMAP are used to retrieve messages and manage mail boxes.

The SMTP client typically initiates a Transmission Control Protocol (TCP) connection to the SMTP server on the well-known port designated for SMTP, port number 25. The originating host, initiating the SMTP session, can be either an end-user's email client, the mail user agent (MUA), or a relay server's mail transfer agent (MTA).

When users compose e-mail messages, they typically use a MUA (email client). The MUA allows messages to be sent and places received messages into the client's mailbox. In order to receive email, as stated earlier, the e-mail client can use POP.

The e-mail server operates two separate processes: MTA and Mail Delivery Agent (MDA). The MTA process is used to forward e-mail, as stated above. The MTA receives messages from the MUA or from another MTA on another e-mail server. Based on the message header (the email envelope and email header is seen by every MTA), it determines how a message has to be forwarded to reach its destination. If the mail is addressed to a user whose mailbox is on the local server, the mail is passed to the MDA. If the mail is for a user not on the local server, the MTA routes the e-mail to the MTA on the appropriate server.

The MDA accepts a piece of e-mail from a MTA and performs the actual delivery. The MDA receives all the inbound mail from the MTA and places it into the approprite users' mailboxes.

Keep in mind, most e-mail communications use the MUA, MTA, and MDA applications. However, there are other alternatives for e-mail delivery that are outside the scope of our CCNA studies. Also keep in mind, the interoperability standard, RFC2821, which defines the Mail Transfer Architecture indicates "the implied boundaries between MUAs and MTAs often do not accurately match common, and conforming, practices with Internet mail."

No comments:

Post a Comment