[Dovecot] Envelope From changed - why?

Tom Alsberg alsbergt at cs.huji.ac.il
Mon Apr 26 10:03:11 EEST 2004


I realize (having read the RFC), that IMAP does not deal with the 
envelope "From " at all.  I also realize that IMAP calls something
else the "envelope", so I'll refer to it as the Unix (mbox) "From "
line.

However, the mbox format does store those lines, and they even still
have some meaning.  If users access their mailboxes both through IMAP
and through mbox files in ~/mail/ (e.g. elm/mutt/pine/mail -f),
(which I assume is a rather common deployment given the option of
storing mail in mbox files, and anyway is the idea in my intended
deployment) compatibility should be preserved wherever possible.

When storing (copying/moving) a message from one mbox to another 
(using the IMAP COPY command), wouldn't it make more sense for dovecot
to copy the entire message block, including the "From " line at the
beginning, instead of inventing/writing its own (phony)
"From <username>@<server>..." line and copying only the rest?

I tried to see if I can patch dovecot to the expected logical
behaviour, however from the little I looked, I got a bit overwhelmed
and confused by all the structs, with the mail_save_context and istream
stuff.  The only simple/trivial thing I could is have it, when copying
a message, given the pointer to the data in the stream, search 
backward for a "From " line and copy from there.  That seems not to
be the most elegant solution...

So, any help with getting my expected behaviour from dovecot is still 
appreciated...

  Thanks,
  -- Tom

On Mon, Apr 26, 2004 at 12:40:58AM +0300, Timo Sirainen wrote:
> On Fri, 2004-04-23 at 13:48, Tom Alsberg wrote:
> > Hi there.
> > 
> > I am evaluating Dovecot as an IMAP server.  I noticed on thing which
> > irritates me.  When a user saves a message to an IMAP folder with the
> > Dovecot server, the envelope From line is changed to the address of
> > that user, instead of keeping the From line of the original message.
> > 
> > How can I have the original envelope From line preserved when saving
> > messages?
> 
> I'm not quite sure what you mean. The mbox From-line? From where should
> it keep it? IMAP protocol doesn't provide IMAP server that information,
> so Dovecot just adds the user name.
> 



-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page:	http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.



More information about the dovecot mailing list