What is the exact difference between the envelope and the email in smtp?
Why does the protocol need the envelope? In snail mail, the letter needs not contain addresses and is not visible to the postman (at least that's what you want to believe), so all the routing is made entirely based on the envelope and that is clear to me.
However in e-mail, the letter itself is parseable and has headers such as From: and To:. Why is that not enough to route email? Why do we need an envelope?
And what is the meaning of a divergence between the envelope and the email itself? Does it necessarily mean that someone is trying to game the system, or is it, under certain circumstances (what circumstances?), legal to have a difference between them.
Your clarifications are more than welcome.
Puzzled email receiver.
The Envelope-Sender address is the email address that identifies where the email originated. It is also the address to which any undeliverable message notices, or bounces, are sent. The Envelope-Sender address is also referred to as the Return-Path address, the Mail From (MFrom) address, and the bounce address.
An envelope is a form of packing. Envelopes are used for sending letters or documents using regular postal mail. Envelopes are usually made of paper or hardened paper.
The “envelope from” is the return address. It tells mail servers where to return or bounce the message back to, when relevant. It's located in the hidden email message header, which includes technical details servers use to understand who the message is for and what software was used to compose it.
Email Envelope vs Email Header An email message is very similar to a physical letter that you would send in the mail. There is an envelope, with To/From information, and there is the actual letter on the inside, with it's own To/From information.
The recipient address in the SMTP RCPT TO:
command is what mail transports use to determine the actual recipient of an email. The addresses in the To: and Cc: headers are there for mail readers to display to users who the recipients are, but they're not actually used by mail transports.
Most mail clients set the same addresses in SMTP RCPT TO:
and MAIL FROM:
commands that they insert in To:, Cc:, and From: headers, so the "envelope" addresses will be the same as the addresses in the headers.
Envelope and header addresses will usually agree for most legitimate mail. Notable exceptions are Bcc: addresses and mailing lists.
Spammers often forge header addresses to try to avoid spam filters.
The bottom line is that the overhead would be too great. When mail servers are processing millions of messages per day, it's much faster during the SMTP session (The Envelope) when the mail server can process individual commands.
If you didn't use an Envelope, you would have to push the entire message at the SMTP server, before you could find out if the message needs to be rejected. Some messages are quite large (I've seen 100+Meg messages working with GIS images).
By using an Envelope, we can issue specific 1 line commands against the mail server, and the mail server will tell us if we are successful or not, right then and there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With