rfc for email addresses: A Comprehensive Overview

Author

Reads 1.1K

Bright yellow sticky note with holiday email marketing message clipped to a wireframe wall.
Credit: pexels.com, Bright yellow sticky note with holiday email marketing message clipped to a wireframe wall.

The RFC for email addresses is a set of guidelines that govern how email addresses are formatted and used. It's a crucial standard that helps ensure emails can be delivered correctly and efficiently.

The first RFC for email addresses was published in 1982, and it established the basic syntax for email addresses. This syntax has remained largely unchanged to this day.

Email addresses are composed of a local part, an at symbol (@), and a domain name. The local part is the part before the @ symbol, and it can contain letters, numbers, and special characters.

Email Address Basics

Email addresses are made up of two main parts: the local part and the domain part. The local part comes before the @ symbol, while the domain part comes after it.

The local part of an email address can be one of three formats: dot-atom, quoted-string, or obs-local-part. Dot-atom and quoted-string are the most commonly used formats and are recommended for new email addresses.

Credit: youtube.com, So you think you can validate email addresses A journey down RFC5321

The domain part of an email address is just as important, and its syntax is determined by the Internet Engineering Task Force (IETF) and the Internet Society (ISOC) through Requests For Comments (RFCs).

The most commonly used formats for the local part are dot-atom and quoted-string. These formats are more commonly used and align with current email standards.

Here are the three formats for the local part of an email address:

  1. Dot-Atom:
  2. Quoted-String:
  3. Obs-Local-Part:

The specifications for email addresses, including the local and domain parts, are published online as RFCs. These specifications determine what characters are acceptable in each part of the email address.

Email Address Validation

Email Address Validation is a crucial aspect of ensuring that email addresses are correctly formatted and can be successfully used for communication.

To validate email addresses, it's essential to rely on third-party libraries that adhere to RFC standards, as they are living documents that change over time.

A well-maintained and regularly updated library is vital for security and regulatory compliance reasons.

Credit: youtube.com, How To Validate Email Addresses? - Be App Savvy

Here's a breakdown of the key components of an email address:

While RFC 5322 provides a formal syntax that technically allows for control characters in email addresses, it's generally not recommended and often unsupported in practice.

In typical email address validation scenarios, a simplified regular expression that excludes control characters is more practical.

Internationalization and Security

Internationalization and security are two crucial aspects of email addresses. With the introduction of Internationalized Domain Names, non-ASCII characters can now be used in both the local and domain parts of an email address.

This means that emails can now contain Chinese and Japanese characters, thanks to UTF-8 characters that represent these non-ASCII characters.

Email security is also a top priority, with several security standards defined in the RFCs. These standards include protocols for encrypting connections and authenticating emails.

Here are some key security protocols mentioned in the RFCs:

Internationalization

Internationalization is a crucial aspect of email communication, especially with the rise of global connectivity. Non-ASCII characters can now be used in both the local and domain parts of an email address thanks to Internationalized Domain Names.

This means that users can now send and receive emails with Chinese and Japanese characters, represented by UTF-8 characters.

Security

Person using a laptop to read an email indoors beside a potted plant.
Credit: pexels.com, Person using a laptop to read an email indoors beside a potted plant.

Email security is a top priority for anyone who communicates online.

RFC 2595 is a protocol that upgrades plaintext IMAP/POP connections to SSL/TLS encrypted ones. This provides an additional layer of security for email users.

SMTP connections can also be upgraded to SSL/TLS encrypted ones using RFC 3207. This helps protect email communications from interception or tampering.

The Transport Layer Security (TLS) protocol, defined in RFC 5246, is used to encrypt connections. This is essential for securing email communications.

DomainKeys Identified Mail (DKIM) Signatures, defined in RFC 6376, allow emails to be signed by a particular domain. This ensures that emails haven't been tampered with and that the domain claims responsibility for the message.

Authenticated Received Chain (ARC), defined in RFC 8617, provides an authenticated chain of custody for messages that have passed through intermediate mail servers.

Email Address Components

An email address is made up of two main components: the local part and the domain part. The local part is what comes before the @ symbol.

Credit: youtube.com, How To Validate Email Addresses

The local part can be up to 64 characters in length and can contain a combination of alphabetic characters, digits, and certain special characters. The period character is valid for the local part, but it's subject to some restrictions: it can't be the first or last character, and two or more consecutive periods are not allowed.

The local part can be composed of three formats: dot-atom, quoted-string, or obs-local-part. In practical terms, most modern systems focus on the dot-atom and quoted-string formats, as they are more commonly used and align with current email standards.

The domain part, on the other hand, cannot be more than 255 characters in length. It must conform to the specification for hostnames, which is a list of dot-separated DNS labels. Each DNS label must not exceed 63 characters.

Here are the restrictions for each DNS label:

The domain part is the part that comes after the @ symbol in an email address.

SMTP and Envelope Addresses

Credit: youtube.com, What Are The DKIM Standards And RFC? - TheEmailToolbox.com

The SMTP envelope is discarded upon delivery, which means the recipient will only see addresses in the headers, not the envelope. This is an important distinction to understand.

The SMTP envelope contains addresses for routing and basic authorization purposes, which are exchanged between the inbound and outbound SMTP service during session initiation. The outbound service issues SMTP commands to establish an SMTP session.

The sender address on the envelope (RFC5321.MailFrom) may differ from the sender address on the message itself (RFC5322.From), a common practice for large corporations or external services used to send email.

Here's a breakdown of the addresses on the SMTP envelope and in email message headers:

These addresses play a crucial role in SMTP and email delivery, and understanding their differences is essential for effective email communication.

SMTP Envelope Addresses

The SMTP envelope is a crucial part of email delivery, and it's essential to understand how it works.

The SMTP envelope is discarded upon delivery, so the recipient won't see the addresses on the envelope in their email application. Instead, they'll only see the addresses in the headers.

You might like: Smtp Server Mass Email

Credit: youtube.com, C# : How can you set the SMTP envelope MAIL FROM using System.Net.Mail?

The envelope is used by the inbound SMTP host to determine where the message should be routed to. This route can be internal or external by relaying to a different SMTP service.

The RFC5321.MailFrom address on the envelope is used to determine if the sending server is allowed to send email for the domain name in the address. This is why many email services now show a warning if the RFC5321.MailFrom domain differs from the domain in the RFC5322.From address.

Here are the different types of addresses on the SMTP envelope:

  • MAIL FROM (RFC5321.MailFrom): The sender address on the envelope
  • RCPT TO (RFC5321.RcptTo): The recipient address on the envelope

The MAIL FROM address may differ from the sender address on the message itself (RFC5322.From), especially when using external services like e-commerce or marketing platforms. This is a common practice to return undeliverable emails to the mail room instead of the office of the sender.

Recommended read: Email Sender Accreditation

Helo

The helo address is the hostname of the outbound SMTP service, used by the inbound SMTP service for basic authentication of the sender.

Broaden your view: Mass Email Smtp

Credit: youtube.com, ESMTP Commands - RSET, VRFY, EHLO, MAIL FROM, RCPT TO, DATA, etc #cisco #emailsecurity

It's issued during the SMTP session initiation phase, where the outbound SMTP host identifies itself with its hostname by sending the EHLO command.

The inbound SMTP verifies that the IP address of the outbound service matches the DNS response for the hostname.

The EHLO command was introduced in 1995 and has been the recommended handshake command since, replacing the earlier HELO command.

HELO was the original command to start the SMTP handshake process, but it was later deprecated in favor of EHLO, which added support for negotiating SMTP options.

This address is still typically referred to as the 'helo' address, even though EHLO has been the standard since 1995.

Email Message Headers

Email message headers are an essential part of the Internet Message Format (IMF). They contain various pieces of information, including addressing the sender and recipient.

One of the key headers used for addressing is the HELO/EHLO host address. This header was added on 10-10-2023 and is used to identify the host that sent the email.

Credit: youtube.com, Email Header Analysis and Forensic Investigation

The Return-Path and Delivered-To header were also added to provide additional addressing information. The Return-Path header is used to specify the email address to which bounce messages should be sent, while the Delivered-To header specifies the email address to which the email was delivered.

These headers are crucial in ensuring that emails are delivered to the correct recipient. They also help in troubleshooting email delivery issues.

Here's a brief overview of the key headers used for addressing:

Address Specification

The local-part of an email address can be composed of three formats: dot-atom, quoted-string, or obs-local-part.

In practical terms, most modern systems focus on the dot-atom and quoted-string formats, as they are more commonly used and align with current email standards.

The dot-atom format is a sequence of characters that may contain letters, digits, or special characters, separated by dots.

The quoted-string format is a sequence of characters enclosed in double quotes, which allows for the inclusion of special characters.

Credit: youtube.com, Maximum Length of an Email Address What You Need to Know

A mailbox specification comprises a person, system, or process name reference, a domain-dependent string, and a name-domain reference.

The name reference is optional and is usually used to indicate the human name of a recipient.

The domain-dependent string is uninterpreted, except by the final sub-domain; the rest of the mail service merely transmits it as a literal string.

Here are the three formats of the local-part of an email address:

  • Dot-Atom: a sequence of characters that may contain letters, digits, or special characters, separated by dots
  • Quoted-String: a sequence of characters enclosed in double quotes, which allows for the inclusion of special characters
  • Obs-Local-Part: typically supported for backward compatibility but not recommended for new email addresses

DMARC and Address Specifications

DMARC considers an email SPF aligned if the domain names in the RFC5321.MailFrom and RFC5322.From address are equal.

The DMARC policy published by the domain owner can specify if the domains in the various email addresses must be an exact match, known as strict alignment, or if subdomains are allowed, known as relaxed alignment.

An email is considered DKIM aligned if it contains at least one DKIM signature where the d= property matches the domain in the RFC5322.From address.

If an email is not SPF or DKIM aligned, the receiver may reject the email, following the DMARC policy published by the domain in the RFC5322.From address.

RFC Comparison and SMTP

Credit: youtube.com, RFC 5321 requires my SMTP server with the Enhanced-Status-Codes service extension to reply with...

RFC 5321 defines the transport protocol for email, which is the Simple Mail Transfer Protocol (SMTP). This protocol was first introduced in RFC821 in 1982 and has undergone several revisions, with the latest being RFC5321 in 2008.

The Simple Mail Transfer Protocol (SMTP) is responsible for sending email. It defines how email is sent from one server to another.

Here's a comparison of the key aspects of RFC5321 and RFC5322:

Mail From

The Mail From address is the address that identifies the origin of a message, but it doesn't necessarily have to be the sender's address itself. It can be the address of the organization providing the SMTP service.

This address is often referred to as the return path, but its original purpose was to serve as a path back to the sender in case the message was undeliverable. It's like the address of the corporate mail room that stamped and sent the message.

Credit: youtube.com, SMTP vs IMAP vs POP3 Explained - Tutorial by Mailtrap

In the early days of SMTP, this address was optional, but later it became a crucial part of the process. The inbound host may use SPF to determine if the outbound host is a delegated sender for the domain in the Mail From address.

The Mail From address is also used for basic authorization, and it's no longer just used as a return path. It's now an important part of the SMTP process, and it's used to verify the sender's identity.

The name "Mail From" is the naming convention commonly used in more contemporary RFCs, and it clarifies that the address is used at the SMTP level following the MAIL FROM command.

RFC5321 vs RFC5322

RFC5321 vs RFC5322 is a crucial distinction to understand when it comes to email protocols. These two standards define the technical specifications for SMTP and IMF respectively.

RFC5321 is the standard for the Simple Mail Transfer Protocol (SMTP), which defines the transport protocol for email. SMTP was first introduced in RFC821 in 1982, replaced by RFC2821 in 2001, and finally replaced by RFC5321 in 2008.

Credit: youtube.com, #70 | 27 Email RFC 5321 | Class With Sonali

RFC5322, on the other hand, is the standard for the Internet Message Format (IMF), which defines the structure of an email. IMF was first introduced in RFC822 in 1982, replaced by RFC2822 in 2001, and finally replaced by RFC5322 in 2008.

To summarize, here's a comparison of the two standards:

Frequently Asked Questions

What is the RFC protocol for email?

The RFC protocol for email is SMTP (Simple Mail Transfer Protocol), which is used for sending emails between computers. It's defined in RFC 5321, a standard that outlines the rules for email transport.

Desiree Feest

Senior Assigning Editor

Desiree Feest is an accomplished Assigning Editor with a passion for uncovering the latest trends and innovations in technology. With a keen eye for detail and a knack for identifying emerging stories, Desiree has successfully curated content across various article categories. Her expertise spans the realm of Azure, where she has covered topics such as Azure Data Studio and Azure Tools and Software.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.