Loading content...
The email address is perhaps the most recognized identifier in digital communication—a compact string that uniquely identifies a mailbox among billions worldwide. From the simple user@example.com to complex organizational hierarchies and internationalized addresses containing non-Latin characters, email addressing encompasses a rich set of standards, patterns, and practices that have evolved over five decades.
Email addressing goes far beyond simple username-and-domain combinations. It encompasses address syntax standards, domain verification, alias systems, forwarding mechanisms, catch-all configurations, subaddressing (plus-addressing), virtual domain hosting, and the increasingly important internationalization of addresses for global accessibility.
Mastering email addressing is essential for mail server administrators, developers building email-integrated applications, security professionals analyzing email authenticity, and anyone responsible for organizational email infrastructure. Understanding how addresses work enables proper configuration, troubleshooting, anti-spoofing implementation, and user experience optimization.
By completing this page, you will master email address syntax including edge cases and international formats, understand how domains are verified and routed, implement aliases and forwarding correctly, configure virtual domains for multi-tenant hosting, and leverage advanced addressing features like subaddressing and recipient rewriting.
The email address format was established in the earliest days of networked email and standardized through successive RFCs. Understanding the complete syntax specification is crucial for validation, parsing, and security.
Basic Format:
local-part@domain
The @ symbol separates two distinct components:
Formal Specification (RFC 5321, RFC 5322):
The standards define precise rules for valid addresses:
| Address | Valid? | Notes |
|---|---|---|
| user@example.com | ✅ Yes | Standard format |
| user.name@example.com | ✅ Yes | Dots allowed in local part |
| user+tag@example.com | ✅ Yes | Plus addressing (subaddressing) |
| user@subdomain.example.com | ✅ Yes | Subdomains allowed |
| .user@example.com | ❌ No | Local part cannot start with dot |
| user..name@example.com | ❌ No | Consecutive dots not allowed |
| user@.example.com | ❌ No | Domain cannot start with dot |
| @example.com | ❌ No | Local part required |
| user@ | ❌ No | Domain required |
| user@example | ⚠️ Maybe | Valid syntax, but no MX typically |
| "john doe"@example.com | ✅ Yes | Quoted local part (rare) |
| user@例え.jp | ✅ Yes | IDN (becomes xn-- encoded) |
Address Validation Best Practices:
Properly validating email addresses is notoriously difficult. Many regex patterns reject valid addresses or accept invalid ones.
Recommended Approach:
What NOT to Do:
// Simple, practical email validation
function isValidEmail(email) {
// Basic structure check - not RFC-complete but practical
const basicPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!basicPattern.test(email)) return false;
const [localPart, domain] = email.split('@');
if (localPart.length > 64) return false;
if (domain.length > 253) return false;
return true;
}
The domain portion of an email address determines where mail should be delivered. Understanding domain handling is essential for mail server configuration and troubleshooting.
Domain Classification:
From an MTA's perspective, domains fall into categories:
1234567891011121314151617181920212223242526272829
# /etc/postfix/main.cf - Domain Configuration # Primary hostname and domainmyhostname = mail.example.commydomain = example.com # Local delivery destinations (traditional Unix mailboxes)mydestination = $myhostname, localhost.$mydomain, localhost # Virtual mailbox domains (database-backed, no system users)virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-domains.cf # Relay domains (forward to another server)relay_domains = internal.example.com # Transport maps (custom routing per domain)transport_maps = hash:/etc/postfix/transport # /etc/postfix/transport - Custom Domain Routinginternal.example.com smtp:[internal-mail.example.com]:25legacy.example.com relay:[legacy-server.example.com]partner.com smtp:partner-mx.example.com # /etc/postfix/mysql-virtual-domains.cfuser = postfixpassword = secrethosts = 127.0.0.1dbname = mailserverquery = SELECT 1 FROM virtual_domains WHERE name='%s' AND active=1DNS Requirements for Email Domains:
Properly configuring DNS is fundamental to email delivery. Each domain handling email needs:
MX Records (Mail Exchanger):
example.com. IN MX 10 mail1.example.com.
example.com. IN MX 20 mail2.example.com.
A/AAAA Records for Mail Servers:
mail1.example.com. IN A 198.51.100.10
mail2.example.com. IN A 198.51.100.11
mail1.example.com. IN AAAA 2001:db8::10
Reverse DNS (PTR Records):
10.100.51.198.in-addr.arpa. IN PTR mail1.example.com.
Authentication Records (TXT):
example.com. IN TXT "v=spf1 mx -all"
default._domainkey.example.com IN TXT "v=DKIM1; k=rsa; p=..."
_dmarc.example.com IN TXT "v=DMARC1; p=reject; rua=..."
Common DNS Issues:
| Issue | Symptom | Solution |
|---|---|---|
| Missing MX | Delivery fails or goes to A record | Add MX records |
| MX points to CNAME | Some servers reject | MX must point to A/AAAA |
| Missing reverse DNS | Rejected by many servers | Add PTR record |
| SPF missing/wrong | Spam classification | Correct SPF record |
| DKIM misconfigured | Authentication fails | Verify key matches |
Email aliases provide alternative addresses that deliver to existing mailboxes or expand to multiple recipients. They're fundamental to managing email in organizations of any size.
Types of Aliases:
123456789101112131415161718192021222324252627282930313233343536
# /etc/aliases - System-wide aliases (Postfix, Sendmail) # Required system aliases (RFC 2142)postmaster: rootabuse: rootwebmaster: adminhostmaster: admin # Simple redirectsadmin: aliceinfo: alice, bob # External forwardingforward-me: external-user@gmail.com # Distribution list via include fileengineering: :include:/etc/mail/lists/engineering # Pipe to programsupport-tickets: "|/usr/local/bin/process-ticket" # Multiple recipients with external addressessales: alice@example.com, bob@example.com, sales-archive@backup.com # Null delivery (discard)blackhole: /dev/null # After editing, run: newaliases (or: postalias /etc/aliases) # /etc/mail/lists/engineering - Include file formatalice@example.combob@example.comcarol@example.com# Comments start with #dave@example.comVirtual Aliases (Domain-Agnostic):
For virtual domain hosting, Postfix uses virtual alias maps instead of system aliases:
# /etc/postfix/virtual
# Format: source-address destination(s)
# Simple virtual aliases
info@domain1.com john@domain1.com
info@domain2.com jane@domain2.com
# Cross-domain forwarding
old-address@domain1.com new-address@domain2.com
# Catch-all (all unmatched for domain)
@domain3.com admin@domain3.com
# Distribution across domains
all-staff@company.com alice@sales.company.com, bob@tech.company.com
Distribution Lists vs. Group Mailboxes:
| Feature | Alias/Distribution List | Shared Mailbox |
|---|---|---|
| Replies go to | Original sender | Shared mailbox |
| Storage | Individual mailboxes | Single shared store |
| Sent mail appears | In each user's Sent | Optional shared Sent |
| Permissions | N/A | Granular (often) |
| Use case | Announcements, forwarding | Collaborative response |
Alias configurations can create forwarding loops (A→B→A) which MTAs detect and break. They also impose expansion limits—a single message to a list of 10,000 recipients creates significant load. Large lists should use mailing list managers (Mailman, Sympa) rather than simple aliases.
Email forwarding redirects messages to different addresses, but this seemingly simple operation has profound implications for authentication, delivery, and troubleshooting.
Forwarding Mechanisms:
The SPF/DKIM/DMARC Forwarding Problem:
Forwarding breaks email authentication in subtle but significant ways:
SPF Breaks:
Original: alice@sender.com → bob@intermediate.com
Forwarded: intermediate.com forwards → carol@final.com
At final.com:
- Envelope-From: often unchanged (alice@sender.com)
- Connecting IP: intermediate.com's server
- SPF check: Does intermediate.com's IP pass sender.com's SPF?
- Result: FAIL (intermediate.com isn't authorized for sender.com)
DKIM Usually Survives: If the forwarding server preserves headers and body unchanged, DKIM signatures remain valid. Modifications (footers, subject prefixes) break DKIM.
DMARC Impact: With SPF failing and DKIM potentially broken, DMARC checks fail, even for legitimate forwarded mail.
Solutions to Forwarding Authentication Issues:
SRS (Sender Rewriting Scheme): Rewrites envelope-From when forwarding:
Original: alice@sender.com
Rewritten: SRS0=hash=tt=sender.com=alice@intermediate.com
Now SPF checks intermediate.com's authorization for intermediate.com, which passes. Bounces route back correctly via SRS decoding.
ARC (Authenticated Received Chain): RFC 8617 extension where forwarding servers add cryptographic seals attesting to authentication status when received. Receiving servers can trust ARC-validated chains from known forwarders.
ARC-Seal: i=1; cv=none; d=intermediate.com; s=arc; ...
ARC-Message-Signature: i=1; d=intermediate.com; ...
ARC-Authentication-Results: i=1; intermediate.com;
dkim=pass header.d=sender.com;
spf=pass smtp.mailfrom=sender.com
When possible, use 'keep a copy' forwarding (Sieve: redirect :copy) rather than pure forwarding. This preserves the original delivery while also forwarding. If forwarding breaks, at least messages remain in the original mailbox.
Subaddressing (commonly called plus addressing or tag addressing) allows users to create dynamic address variations that all deliver to the same mailbox. The most common format uses a plus sign (+) separator:
user+tag@example.com → user@example.com (same mailbox)
How Subaddressing Works:
john+newsletter@example.comjohn+newsletter@example.com+tag portion (configurable delimiter)john@example.com mailbox12345678910111213141516171819202122232425262728293031323334353637
# /etc/postfix/main.cf # Enable plus addressing for local delivery# recipient_delimiter specifies the separator characterrecipient_delimiter = + # For virtual mailbox hosting:# Postfix strips the +tag before virtual mailbox lookup# virtual_mailbox_maps lookup for "user@domain" matches "user+tag@domain" # Sieve filter using subaddress for sorting (Dovecot)# ~/.dovecot.sieve require ["envelope", "subaddress", "fileinto"]; # Use detail (the +tag part) for folder filingif envelope :detail "to" "shopping" { fileinto "Shopping"; stop;} if envelope :detail "to" "newsletters" { fileinto "Newsletters"; stop;} if envelope :detail "to" "banking" { fileinto "Finance"; stop;} # Alternative: Use wildcard matching on full addressif envelope :matches "to" "*+*@example.com" { # Extract tag and file to folder named after tag # (More complex Sieve with variables extension)}Alternative Delimiters:
While + is most common, some systems use different delimiters:
| Delimiter | Example | Common Provider |
|---|---|---|
| user+tag@domain | Gmail, Outlook, most modern systems | |
| user-tag@domain | Some legacy systems | |
| . | user.tag@domain | Some configurations (conflicts with normal dots) |
| = | user=tag@domain | Rare |
Limitations:
Gmail ignores dots in the local part: john.doe@gmail.com, johndoe@gmail.com, and j.o.h.n.d.o.e@gmail.com all deliver to the same mailbox. This is Gmail-specific behavior, not a standard. Do not assume other providers work this way.
Virtual domain hosting enables a single mail server to handle email for multiple independent domains, each with its own users, without requiring system accounts for each mailbox. This architecture powers email hosting providers, managed services, and organizations with multiple domains.
Virtual vs. Local (System) Domains:
| Aspect | Local Domain | Virtual Domain |
|---|---|---|
| User Storage | System accounts (/etc/passwd) | Database/LDAP records |
| Home Directory | Per-user home directories | Configurable (often vhost-style) |
| Shell Access | Potentially available | Not required |
| Quota Management | System quotas | Application-level |
| Scalability | Limited by OS user limits | Virtually unlimited |
| Administration | Unix commands | Application/database |
| Multi-domain | Complex | Native |
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
# /etc/postfix/main.cf - Virtual Mailbox Configuration # Virtual mailbox domain list (from database)virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-domains.cf # Virtual mailbox locations (from database) virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailboxes.cf # Virtual aliases (from database)virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-aliases.cf # Base directory for virtual mailboxesvirtual_mailbox_base = /var/vmail # Virtual user/group for mailbox ownershipvirtual_uid_maps = static:5000virtual_gid_maps = static:5000virtual_minimum_uid = 100 # Delivery via Dovecot LMTPvirtual_transport = lmtp:unix:private/dovecot-lmtp # /etc/postfix/mysql-virtual-domains.cfuser = postfix_userpassword = database_passwordhosts = 127.0.0.1dbname = mailserverquery = SELECT name FROM virtual_domains WHERE name='%s' AND active=1 # /etc/postfix/mysql-virtual-mailboxes.cfquery = SELECT CONCAT(domain, '/', local_part, '/') FROM virtual_users WHERE email='%s' AND active=1 # /etc/postfix/mysql-virtual-aliases.cfquery = SELECT destination FROM virtual_aliases WHERE source='%s' AND active=1 # Database schema exampleCREATE TABLE virtual_domains ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL UNIQUE, active BOOLEAN DEFAULT TRUE, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP); CREATE TABLE virtual_users ( id INT AUTO_INCREMENT PRIMARY KEY, domain_id INT REFERENCES virtual_domains(id), email VARCHAR(255) NOT NULL UNIQUE, local_part VARCHAR(64) NOT NULL, domain VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, -- Encrypted quota_bytes BIGINT DEFAULT 1073741824, -- 1GB active BOOLEAN DEFAULT TRUE, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP); CREATE TABLE virtual_aliases ( id INT AUTO_INCREMENT PRIMARY KEY, domain_id INT REFERENCES virtual_domains(id), source VARCHAR(255) NOT NULL, destination VARCHAR(255) NOT NULL, active BOOLEAN DEFAULT TRUE);Virtual Mailbox Directory Structure:
/var/vmail/
├── domain1.com/
│ ├── alice/
│ │ ├── Maildir/
│ │ │ ├── cur/
│ │ │ ├── new/
│ │ │ └── tmp/
│ │ └── sieve/
│ └── bob/
│ └── Maildir/
├── domain2.com/
│ ├── user1/
│ │ └── Maildir/
│ └── user2/
│ └── Maildir/
└── domain3.net/
└── ...
Multi-Tenant Isolation:
Virtual hosting must ensure domain isolation:
A catch-all (or default) address receives all mail sent to undefined addresses within a domain. While sometimes useful, catch-all configurations carry significant implications.
Catch-All Configuration:
# Virtual alias catch-all
@example.com admin@example.com
# This means: any address at example.com not otherwise defined
# delivers to admin@example.com
Legitimate Use Cases:
Alternatives to Catch-All:
Explicit Address Creation: Create specific addresses/aliases for each use case. More work upfront but cleaner long-term.
Subaddressing:
Use plus addressing (admin+anything@example.com). Provides flexibility without catch-all risks.
Reject Unknown at SMTP Time:
smtpd_reject_unlisted_recipient = yes
Reject invalid addresses during SMTP conversation. Prevents spam to nonexistent addresses from entering the system.
Redirect to Rejection Address: Catch-all to an address that auto-replies with "address not found" rather than accepting silently.
Catch-All with Aggressive Filtering: If catch-all is required, apply extra scrutiny (spam scoring, rate limiting) to messages to catch-all recipients.
Catch-all configurations are generally discouraged unless absolutely necessary. The spam amplification effect usually outweighs any convenience benefit. Default to rejecting unknown recipients at SMTP time for better security and resource management.
Email Address Internationalization (EAI), defined in RFC 6530 and related standards, extends email to support non-ASCII characters in both the local part and domain part of addresses. This enables billions of people to use email addresses in their native scripts.
Examples of Internationalized Addresses:
пользователь@почта.рф (Russian Cyrillic)
用户@邮箱.中国 (Chinese)
उपयोगकर्ता@डाक.भारत (Hindi Devanagari)
utilisateur@courriel.québec (French with accent)
δοκιμή@παράδειγμα.δοκιμή (Greek)
How IDN Domain Encoding Works:
User sees: 用户@邮箱.中国
DNS query: 用户@xn--5nxu16j.xn--fiqs8s
Conversion (Punycode/IDNA):
邮箱 → xn--5nxu16j
中国 → xn--fiqs8s
EAI Adoption Challenges:
| Challenge | Description |
|---|---|
| Limited Server Support | Many MTAs don't support SMTPUTF8 yet |
| Path Requirement | Entire delivery path must support EAI |
| Fallback Complexity | Downgrade to ASCII addresses for incompatible systems |
| Application Support | Many applications incorrectly validate/reject EAI addresses |
| User Experience | Entering addresses in different scripts varies by keyboard/OS |
| Homograph Attacks | Visual spoofing using similar-looking characters from different scripts |
Current Status (2026):
Major providers (Gmail, Outlook.com) support receiving EAI mail. Sending EAI addresses (using them as the From address) has more limited support. Adoption is growing, especially in regions with non-Latin scripts.
Configuring EAI Support (Postfix):
# /etc/postfix/main.cf
smtputf8_enable = yes
smtputf8_autodetect_classes = sendmail, verify
Before deploying EAI addresses in production, test thoroughly. Send to and from EAI addresses, verify display in various clients, and confirm bounces work correctly. Many integration points may have issues with non-ASCII characters.
Address rewriting modifies email addresses as messages pass through the mail system. This can normalize addresses, hide internal structure, or implement special routing.
Types of Rewriting:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
# /etc/postfix/main.cf - Address Rewriting # ===== SENDER REWRITING ===== # Masquerade (hide subdomain in From)masquerade_domains = corp.example.commasquerade_classes = envelope_sender, header_sendermasquerade_exceptions = root, postmaster # This rewrites:# alice@dept.corp.example.com → alice@corp.example.com # Canonical sender rewriting (general transformation)sender_canonical_maps = hash:/etc/postfix/sender_canonical # /etc/postfix/sender_canonicalalice alice.johnson@example.com@old.example.com @example.com # SMTP-time sender rewriting (for outbound only)smtp_generic_maps = hash:/etc/postfix/generic # /etc/postfix/genericalice@localhost alice.johnson@example.comroot@localhost sysadmin@example.com # ===== RECIPIENT REWRITING ===== # Canonical recipient rewritingrecipient_canonical_maps = hash:/etc/postfix/recipient_canonical # /etc/postfix/recipient_canonicalold-list@example.com new-list@example.comformer-employee current-employee@example.com # ===== SRS (Sender Rewriting Scheme) =====# Implemented via policy service or milter # Using PostSRSd:sender_canonical_maps = tcp:localhost:10001sender_canonical_classes = envelope_senderrecipient_canonical_maps = tcp:localhost:10002recipient_canonical_classes = envelope_recipient,header_recipientRewriting Considerations:
Preserve Original for Replies: Rewriting the header From/Reply-To affects where replies go. Rewriting only the envelope affects routing/authentication but preserves reply path.
Impact on DKIM: Rewriting the From header invalidates DKIM signatures that include the From header. Consider re-signing after rewriting.
Logging/Tracking: Document rewrite rules thoroughly. When troubleshooting delivery, ensure you can trace both original and rewritten addresses.
Transitive Mappings: Be cautious of rewrite chains: A→B, B→C. Most systems don't apply rewrites recursively, but some do, potentially creating loops.
We have thoroughly explored email addressing—from basic syntax through advanced configurations powering complex multi-domain environments. Let's consolidate this knowledge:
Module Complete:
With this page, you have completed Module 1: Email Architecture. You now possess comprehensive knowledge of:
The next modules will dive deep into specific email protocols (SMTP, POP3, IMAP) and advanced topics like email security.
Congratulations! You have mastered Email Architecture—the foundational knowledge underpinning all email system design, configuration, and troubleshooting. You're now prepared to explore email protocols in depth and implement production-grade email infrastructure.