MBOX-Line: From arnt at gulbrandsen.priv.no  Mon Oct 17 07:32:37 2005
To: imap-protocol@u.washington.edu
From: Arnt Gulbrandsen <arnt@gulbrandsen.priv.no>
Date: Fri Jun  8 12:34:36 2018
Subject: [Imap-protocol] Envelope "From" via IMAP
In-Reply-To: <858610995.1129557894.146542220.97946@mcgi3.rambler.ru>
References: <858610995.1129557894.146542220.97946@mcgi3.rambler.ru>
Message-ID: <VsQ8PN3CdbvPkzPLVrYQ9g.md5@prosecco.oryx.com>

Alex Kapranoff writes:
> Is there a way to get envelope "From" information for a mail via IMAP? 
> Specifically, "ENVELOPE" fetch item does not seem to return it.

Use "uid fetch n body.peek[header.fields (return-path)]" to fetch the 
envelope sender. RFC 2821 (and earlier RFCs) require that the envelope 
sender address is stored in return-path when making final delivery. 
Some MTAs get it wrong, though.

Arnt

