On Wed, Jun 17, 2015 at 09:48:46AM +0300, Michael Peter wrote:
> > There is no requirement that the addresses are the same. Look at
> > this mail for an example.
>
> How come sender email address mentioned in the postfix log file is
> different than the sender email address mentioned in the email?
The envelope sender address is not part of the message content
(think letter inside a posted envelope) it is part of the envelope
that is used to route the message. The envelope sender need not
agree with any claimed origin inside the message.
> If postix really log the envelope sender as given in the MAIL FROM
> command during the SMTP conversation
There is no "if", the logs record the envelope sender at the time
the message enters the active queue.
> and not "return-path email header"
While a message is in transit, there is no "Return-Path:" header,
that header is only added when the message is finally delivered to
a mailbox and records the envelope sender address *at that time*.
Note that the envelope sender address can change en-route, based
on whatever address rewriting rules apply at the transit MTAs.
> then how come i can see that the log file mentioned in a different sender
> email address than the email sender appears at outlook or webmail ?
Mail stored in the mailbox shows the "From:" address from the
message content (enclosed letter), not the envelope. Some
MUAs also display "Sender:" when different as:
From: "Sender Address" on behalf of "From Address"
This is a sensible feature. But the envelope return address
(from Return-Path if any) is not displayed by most MUAs.
--
Viktor.