On 2004.04.27 09:53, Tom Alsberg wrote:
Comment below:
On Mon, Apr 26, 2004 at 11:43:59AM +0200, Miquel van Smoorenburg wrote:
On 2004.04.26 09:03, Tom Alsberg wrote:
<snip /> However, the mbox format does store those lines, and they even still have some meaning.
Why not let your MDA or local delivery agent add a proper Return-Path: header. It contains the same information as the From_ line, but it works with all mailbox types, it's easier to parse and you can get at it using IMAP.
Well, my MTA, as most others, does add a Return-Path: header. Usually it contains the same information as the From_ line, but not always,
I think that would be a bug.
IIRC (the Return-Path: header, IIRC, may be altered/added to by an SMTP relay in the way
No, the Return-Path header is not present at SMTP transport time. It is added the moment the message leaves the SMTP domain, i.e. the moment it drops into a local mbox (or is sent through another transport like UUCP). That is the same moment a From_ header is added, and the content should be the same.
while the envelope From_ line is guaranteed to remain as it was).
The From_ line is only retained over UUCP, no other transport has a From_ line in the message. SMTP certainly doesn't.
Never mind that, however - naturally I can have the same information stored also in the headers (X-Envelope-From: or something like that).
However, I would still like the From_ line to remain intact - I see no reason to rewrite it while copying the message, instead of keeping the original one. Actually, some user agents and other software even do read it and regard it (for filtering, marking messages, sorting and merging mailboxes, etc.), so it disturbs a bit when that's changed.
Well, when COPYing mailboxes over IMAP dovecot should be able to retain the From_ line I suppose (if the internal API is rich enough) - but if the MUA does something like get message from folder A and write it to folder B (which many clients still do) the From_ line gets lost.
I suppose the mbox folder code could get the basic info for the From_ line from the Return-Path: header if it is present. That's what my own mbox library for internal projects does...
Mike.