Is there a common X-Header for RFC 2821 "MAIL FROM"? Should it be DKIM signed?

LamonteCristo asked:

w.r.t. the difference between RFC2821 MAIL From and RFC2822 FROM I’m considering having my MTA add a header specifying what was sent in the MAIL FROM portion of the envelope.

The RFC2821 header is used for receiving email bouncebacks, and is the header that is checked in SPF and some SenderID configurations.

The goal is to make it easier for diagnostics and debugging by having this low level information in the email header.

  • What is an acceptable name for this SMTP header?

  • Should this header be signed by DKIM? Is there any reason why it shouldn’t be signed?

My answer:


On delivery, the address specified in MAIL FROM is placed in the Return-Path: header. See RFC 2821 section 4.4:

When the delivery SMTP server makes the “final delivery” of a message, it inserts a return-path line at the beginning of the mail data. This use of return-path is required; mail systems MUST support it. The return-path line preserves the information in the from the MAIL command. Here, final delivery means the message has left the SMTP environment. Normally, this would mean it had been delivered to the destination user or an associated mail drop, but in some cases it may be further processed and transmitted by another
mail system.

You can’t sign this header because you don’t create it; the destination SMTP server adds the header.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.