Transport of email across the Internet uses the Simple Mail Transfer Protocol (SMTP), which is defined in Internet standards RFC 5321 and RFC 5322, while mailboxes are most often accessed with the Post Office Protocol (POP) and the Internet Message Access Protocol (IMAP).
Email addresses, such as [email protected], have two parts. The part before the @ sign is the local-part of the address, often the username of the recipient (jsmith), and the part after the @ sign is a domain name to which the email message will be sent (example.com).
An SMTP server looks up the domain name using the Domain Name System, which is a distributed database. A server queries the DNS for any mail exchanger records (MX records) to find the host name of a designated mail transfer agent (MTA) for that address. That way, the organization holding the delegation for a given domain - the mailbox provider - can define which are the target hosts for all email destined to its domain. The mail exchanger does not need to be located in the domain of the destination mail box; it must simply accept mail for the domain. The target hosts are configured with a mechanism to deliver mail to all destination mail boxes. The local-part of an address is defined to be opaque to intermediate mail relay systems except the final mailbox host. For example, it must not be assumed to be case-insensitive.
Multiple email addresses may point to the same mailbox. Conversely, a single email address may be an alias and have a distribution function to many mailboxes. Email aliases, electronic mailing lists, sub-addressing, and catch-all addresses, the latter being mailboxes that receive messages irrespectively of the local part, are common patterns for achieving such results.
The addresses found in the header fields of an email message are not the ones used by SMTP servers to deliver the message. Servers use the so-called message envelope to route mail. While envelope and header addresses may be equal, forged email addresses are often seen in spam, phishing, and many other internet-based scams. This has led to several initiatives which aim to make such forgeries easier to spot.