mailing list archives

meli community discussions

⚠️ if something does not work as intended when interracting with the mailing lists,
reach out Github mirror Gitea repo @epilys:matrix.org

E-mail headers
From: Alex Kapranoff <kkapp@rambler.ru>
To: imap-protocol@u.washington.edu
Date: Fri, 08 Jun 2018 12:34:36 -0000
Message-ID: 858610995.1129557894.146542220.97946@mcgi3.rambler.ru permalink / raw / eml / mbox
Good day!

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

--
AA KK.
Reply
E-mail headers
From: tss@iki.fi
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:36 -0000
Message-ID: 1129558735.1214.360.camel@hurina permalink / raw / eml / mbox
On Mon, 2005-10-17 at 18:04 +0400, Alex Kapranoff wrote:
> Is there a way to get envelope "From" information for a mail via IMAP?
> Specifically, "ENVELOPE" fetch item does not seem to return it.

No, unless it was written to some header by your MDA.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20051017/993971b9/attachment.sig>
Reply
E-mail headers
From: arnt@gulbrandsen.priv.no
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:36 -0000
Message-ID: VsQ8PN3CdbvPkzPLVrYQ9g.md5@prosecco.oryx.com permalink / raw / eml / mbox
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
Reply
E-mail headers
From: mrc@CAC.Washington.EDU
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:36 -0000
Message-ID: Pine.OSX.4.64.0510170721100.1022@pangtzu.panda.com permalink / raw / eml / mbox
On Mon, 17 Oct 2005, Timo Sirainen wrote:
> On Mon, 2005-10-17 at 18:04 +0400, Alex Kapranoff wrote:
> > Is there a way to get envelope "From" information for a mail via IMAP?
> > Specifically, "ENVELOPE" fetch item does not seem to return it.
> No, unless it was written to some header by your MDA.

I was confused when I first read this message.

I assume that you are talking about the internal "From " line that appears 
in the traditional UNIX mailbox format, and *not* the RFC 2822 "From:" 
header line?  If so, then Timo's response is correct.

The "From " line is an artifact of traditional UNIX mailbox format; it 
does not appear in other mailbox formats.  This generally contains the 
return address, which is not necessarily the same as the originator or 
reply address.

Many MDAs will write a Return-Path: header with this data.  If yours does 
not, there many be a switch in your mail delivery configuration to enable 
it.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
Reply
E-mail headers
From: kkapp@rambler.ru
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:36 -0000
Message-ID: 981898297.1129568903.151266908.97949@mcgi3.rambler.ru permalink / raw / eml / mbox
* Mark Crispin <mrc@CAC.Washington.EDU> [Mon, 17 Oct 2005 07:24:38
-0700 (PDT)]:
> I assume that you are talking about the internal "From " line that
appears 
> in the traditional UNIX mailbox format, and *not* the RFC 2822 "From:" 
> header line?  If so, then Timo's response is correct.
> 
> The "From " line is an artifact of traditional UNIX mailbox format; it 
> does not appear in other mailbox formats.  This generally contains the 
> return address, which is not necessarily the same as the originator or 
> reply address.
> 
> Many MDAs will write a Return-Path: header with this data.  If yours
does 
> not, there many be a switch in your mail delivery configuration to
enable 
> it.

Yes, that's the answer I expected, thank you. I am going to use
Return-Path: header for my goals now.
Didn't know though that "From " is an artifact of one specific mailbox
format and therefore not universally available.
I wanted to know whether there's a special FETCH item or something. My
IMAP server uses mboxes so it somehow
seemed natural to be able to fetch the data that is stored with the
mails :)

I need this info to detect DSNs, btw.

--
Alex Kapranoff.
Reply