Hi, just a simple question about dovecot: The mbox file format contains the SMTP envelope sender and transmission date in a FROM ... line preceding the RFC822 mail header and body. As far as I see at the moment, the IMAP protocol does not support transmission of that SMTP envelope data in either way, but confusingly uses the term ?envelope? for a structure describing the RFC822 mail header. My question is, whether there is any way to retrieve the SMTP envelope through dovecot's IMAP anyway, maybe through some extension. regards Hadmut
Andrzej Adam Filip
2011-Oct-21 17:53 UTC
[Dovecot] Getting the SMTP envelope through IMAP?
Hadmut Danisch <hadmut at danisch.de> wrote:> just a simple question about dovecot: > > The mbox file format contains the SMTP envelope sender and transmission > date in a FROM ... line preceding the RFC822 mail header and body. > > As far as I see at the moment, the IMAP protocol does not support > transmission of that SMTP envelope data in either way, but confusingly > uses the term ?envelope? for a structure describing the RFC822 mail header. > > My question is, whether there is any way to retrieve the SMTP envelope > through dovecot's IMAP anyway, maybe through some extension.Almost all MTA copy "(SMTP) envelope sender" to Return-Path: header before delivery to the final mailbox. If you do not get Return-Path: header in messages delivered to your (dovecot) mailbox then name your MTA (exim/postfix/sendmail/.....). -- [pl>en: Andrew] Andrzej Adam Filip : anfi at onet.eu You are absolute plate-glass. I see to the very back of your mind. -- Sherlock Holmes
On Fri, Oct 21, 2011 at 05:34:49PM +0200, Hadmut Danisch wrote:> Hi, > > just a simple question about dovecot: > > The mbox file format contains the SMTP envelope sender and transmission > date in a FROM ... line preceding the RFC822 mail header and body.The line 'From foo at bar [..]' is only a seperation for different emails in the mbox (in contrast, an RFC 822 From: is followed by a colon).> As far as I see at the moment, the IMAP protocol does not support > transmission of that SMTP envelope data in either way, but confusinglyThe SMTP envelope does only exist within the involved MTAs and only as long as the message is not finally delivered. And if the MTA does not reveal the value of MAIL FROM: there will only be the address from the Return-Path: or From: header fields to populate the From line.> uses the term ?envelope? for a structure describing the RFC822 mail header. > > My question is, whether there is any way to retrieve the SMTP envelope > through dovecot's IMAP anyway, maybe through some extension.Hardly. Even something like FETCH 1 (BODY[HEADER.FIELDS (FROM)]) would not reveal the mbox message seperator but the RFC 822 From: header. Dennis