Home » Computer Network » Explain the address scheme used by SMTP.

Explain the address scheme used by SMTP.

Last updated:

Support this post with a reaction:

4,528 views

Simple Mail Transfer Protocol (SMTP) is an application-layer protocol used to send and transfer email messages over the Internet. It allows users to send emails from one mail server to another and helps deliver messages to the correct recipient.

For successful email delivery, SMTP uses a specific addressing scheme to identify the sender and receiver of an email. This addressing scheme helps SMTP determine where an email should be sent and which mail server is responsible for receiving it.

The SMTP address scheme mainly uses an email address consisting of two important parts: the local part and the domain name. These two parts are separated by the @ symbol.

What is an SMTP Address Scheme?

The SMTP address scheme is the method used by SMTP to represent email addresses and identify the source and destination of email messages.

An SMTP email address generally follows this format:

local-part@domain-name \text{local-part@domain-name}

For example:

anish@gmail.com

Here:

  • Local Part: anish identifies the mailbox or user within the domain.
  • @ Symbol: Separates the local part from the domain name.
  • Domain Name: gmail.com identifies the domain responsible for handling the email.

When a user sends an email, SMTP uses the recipient’s address to determine the destination mail server. The sending server can use the Domain Name System (DNS), particularly MX (Mail Exchange) records, to identify the mail server responsible for receiving emails for that domain.

Main Components of the SMTP Address Scheme

An SMTP email address consists of two main components. Each component performs a different function in identifying the destination of an email message.

1. Local Part

The local part is the portion of an email address that appears before the @ symbol. It identifies a particular mailbox or recipient within a domain.

For example, in the email address anish@gmail.com, the local part is deekshitha.

Important points about the local part:

  • It identifies the mailbox where the email should be delivered.
  • It is interpreted by the mail system responsible for the domain.
  • It can contain letters, numbers, and certain special characters.
  • It may contain dots to separate different parts of the mailbox name.
  • According to SMTP standards, the local part may be case-sensitive, depending on the receiving domain.

Example:

Consider the email address support@quescol.com.

Here, support is the local part. It identifies the mailbox used for receiving support-related emails at the quescol.com domain.

2. Domain Name

The domain name is the portion of an email address that appears after the @ symbol. It identifies the domain responsible for handling the recipient’s email.

For example, in anish@gmail.com, the domain name is gmail.com.

Important points about the domain name:

  • It identifies the destination email domain.
  • It helps SMTP locate the appropriate mail server.
  • It is generally made up of letters, numbers, and hyphens.
  • It may contain multiple parts separated by dots.
  • SMTP uses DNS records, especially MX records, to find the mail server responsible for receiving emails for the domain.

Example:

Consider the email address admin@quescol.com.

Here, quescol.com is the domain name. When an email is sent to this address, the sending mail server checks the DNS information to identify the appropriate receiving mail server.

Different Address Formats Used in SMTP

SMTP supports a standard mailbox address format. It also uses specific address representations while exchanging commands between mail servers.

The following are the important address formats:

1. Standard Mailbox Address

The standard SMTP mailbox address follows this format:

local-part@domain

It consists of a local part followed by the domain name, separated by the @ symbol.

Example:

student@example.com

In this example:

  • student represents the local part.
  • example.com represents the domain name.

This address identifies the mailbox of a user named student within the example.com domain.

2. Angle Bracket Address Format

During SMTP communication, email addresses are generally enclosed within angle brackets (< >) when they are included in SMTP commands.

For example:

<student@example.com>

SMTP uses this format in commands such as MAIL FROM and RCPT TO.

Consider the following commands:

MAILFROM:<sender@example.com>RCPTTO:<receiver@example.com>MAIL FROM:<sender@example.com> RCPT TO:<receiver@example.com>

Here:

  • MAIL FROM specifies the sender’s email address.
  • RCPT TO specifies the recipient’s email address.

The angle brackets clearly identify the address within the SMTP command.

3. Address Literal Format

SMTP also supports an alternative addressing format called an address literal. It can be used when the destination host is identified directly by its IP address instead of a domain name.

An address literal is enclosed within square brackets ([ ]).

Example:

user@[192.0.2.10]user@[192.0.2.10]

Here, user represents the local part, while [192.0.2.10] represents the IPv4 address of the destination host.

This format can be useful in specific situations where a host cannot be identified through the DNS. SMTP also supports IPv6 address literals.

How Does the SMTP Address Scheme Work?

The SMTP address scheme plays an important role in transferring emails from the sender to the intended recipient. It helps the sending mail server identify the destination domain and communicate with the appropriate receiving mail server.

The working process involves the following steps:

  1. Sender Creates an Email: The sender writes an email and enters the recipient’s email address in the required field.
  2. SMTP Identifies the Recipient Address: The sending mail system separates the recipient’s email address into two parts: the local part and the domain name.
  3. DNS Lookup: The sending mail server checks the DNS records of the recipient’s domain to find its Mail Exchange (MX) records. These records identify the mail servers responsible for receiving emails for that domain.
  4. Connection with the Receiving Mail Server: The sending mail server establishes an SMTP connection with the appropriate receiving mail server.
  5. Sender Identification: The sending server uses the MAIL FROM command to specify the sender’s email address.
  6. Recipient Identification: The sending server uses the RCPT TO command to specify the recipient’s email address.
  7. Message Transfer: After the receiving server accepts the sender and recipient information, the sending server uses the DATA command to transfer the email message.
  8. Email Delivery: The receiving mail server processes the message and attempts to deliver it to the recipient’s mailbox.

Thus, the SMTP address scheme helps identify the sender and receiver and supports the correct routing and delivery of email messages.

SMTP Addressing Through Commands

SMTP uses specific commands to identify the sender and recipient during email transmission. These commands are part of the SMTP communication process.

The three important commands are:

1. MAIL FROM Command

The MAIL FROM command specifies the sender’s email address. It identifies the source of the email message and starts the SMTP mail transaction.

Syntax:

MAILFROM:<sender@example.com>MAIL FROM:<sender@example.com>

Example:

MAILFROM:<anish@gmail.com>MAIL FROM:<anish@gmail.com>

This command indicates that the email is being sent from anish@gmail.com.

2. RCPT TO Command

The RCPT TO command specifies the recipient’s email address. It tells the receiving mail server where the email should be delivered.

Syntax:

RCPTTO:<recipient@example.com>RCPT TO:<recipient@example.com>

Example:

RCPTTO:<student@gmail.com>RCPT TO:<student@gmail.com>

This command indicates that the email is intended for student@gmail.com.

An SMTP transaction can contain multiple RCPT TO commands when an email is sent to multiple recipients.

3. DATA Command

The DATA command indicates that the sender is ready to transfer the actual email message, including its headers and body.

Example:

DATA
Subject: SMTP Address Scheme

Hello,
This is an example of an email message.
.

A single period (.) on a separate line indicates the end of the email message data.

Example of SMTP Addressing

Consider a situation where a user named Anish wants to send an email to another user named Student.

  • Sender’s email address: anish@gmail.com
  • Recipient’s email address: student@example.com

The SMTP communication may look like this:

S: 220 mail.example.com Ready
C: EHLO gmail.com
S: 250 Hello gmail.com

C: MAIL FROM:<anish@gmail.com>
S: 250 Sender accepted

C: RCPT TO:<student@example.com>
S: 250 Recipient accepted

C: DATA
S: 354 Start mail input

C: Subject: SMTP Address Scheme
C:
C: Hello Student,
C: This is an example email.
C: .
S: 250 Message accepted for delivery

C: QUIT
S: 221 Goodbye

Here, C represents the SMTP client (sending system), and S represents the SMTP server.

Explanation:

  1. The SMTP client establishes a connection with the receiving mail server.
  2. The EHLO command identifies the sending client.
  3. The MAIL FROM command specifies the sender’s email address.
  4. The RCPT TO command specifies the recipient’s email address.
  5. The DATA command transfers the actual email content.
  6. The server responds with a success message after accepting the email for delivery.
  7. Finally, the QUIT command terminates the SMTP connection.

This example demonstrates how SMTP uses email addresses and commands to identify the sender, specify the recipient, and transfer email messages.

Difference Between SMTP Address and Email Header Address

SMTP uses email addresses in two different contexts: the SMTP envelope and the email message headers.

SMTP Envelope AddressEmail Header Address
Used during SMTP communication.Included in the email message.
Identifies the sender and recipients for message delivery.Displays information such as From, To, and Cc.
Uses commands such as MAIL FROM and RCPT TO.Uses header fields such as From:, To:, and Cc:.
Mainly controls email routing and delivery.Provides sender and recipient information to email applications.

For example, the MAIL FROM address does not always have to match the From: address displayed in the email application. Both serve different purposes.

Important Characteristics of the SMTP Address Scheme

The SMTP address scheme has several important characteristics that support reliable email communication.

  1. Unique Mailbox Identification: It identifies a particular mailbox within a domain using the local part.
  2. Domain-Based Addressing: It uses domain names to identify the destination email domain.
  3. DNS Integration: It works with DNS MX records to locate the appropriate receiving mail server.
  4. Standard Address Format: It follows the standard local-part@domain format for identifying email addresses.
  5. Multiple Recipients: SMTP allows a message to be sent to multiple recipients using multiple RCPT TO commands.
  6. Flexible Addressing: It supports different local-part formats and address literals for specific communication requirements.
  7. Reliable Message Routing: It helps mail servers identify the destination and transfer email messages through the appropriate SMTP servers.

Advantages of the SMTP Address Scheme

The SMTP address scheme provides several benefits for email communication.

  • Easy Identification: It makes it easy to identify the sender and recipient of an email.
  • Efficient Email Routing: Domain names help SMTP locate the appropriate destination mail server.
  • Standardized Communication: It provides a common addressing format that different email systems can understand.
  • Multiple Recipient Support: It allows users to send the same email to multiple recipients.
  • Compatibility: It supports communication between different email services and mail servers.
  • Organized Email Delivery: It helps mail servers direct messages to the appropriate recipient mailboxes.