<<< Date Index >>>     <<< Thread Index >>>

Re: enveloppe date updated on attachement deletion!



On Sat, Mar 13, 2010 at 07:04:22AM -0800, Michael Elkins wrote:
> On Sat, Mar 13, 2010 at 11:03:25AM +0100, Louis-David Mitterrand wrote:
> > On Fri, Mar 12, 2010 at 11:41:29PM -0800, Michael Elkins wrote:
> > > On Fri, Mar 12, 2010 at 05:59:07PM +0100, Louis-David Mitterrand wrote:
> > > > In latest mutt the envelope date (From_) is updated when an attachement
> > > > is deleted. 
> > > > 
> > > > This completely messes up date-received sorting.
> > > > 
> > > > I'm using IMAP.
> > > > 
> > > > Bug or feature?
> > > 
> > > In the IMAP case, Mutt has to upload a new copy of the message without
> > > the attachment.  There is no way to edit in place like with local
> > > mailboxes.  Note that in the IMAP case, the From_ line is generated by
> > > the IMAP server, not by Mutt, since the IMAP server can choose to use
> > > several mailbox formats.
> > 
> > Isn't attachement deletion part of the IMAP protocol?
> 
> No, it is not.
> 
> However, I just looked at the IMAP4rev1 standard and noticed that the
> APPEND command does allow the internal date to be specified when a
> message is uploaded.  Sure enough, Mutt does provide this information
> (see mutt/imap/message.c, line 639).  IMAP4rev1 has this to say:
> 
>       If a date-time is specified, the internal date SHOULD be set in
>       the resulting message; otherwise, the internal date of the
>       resulting message is set to the current date and time by default.
> 
> Notice that it does not say MUST.  So I'm wondering if OP's IMAP server does
> not honor the given internal date.  I suggest using debug mode (mutt -d 5)
> in order to see what Mutt is passing to the server in this case.

Here is the output of an attachement deletion test with -d5:

        [2010-03-13 16:38:26] 42> DONE
        a0021 APPEND "INBOX.BCC" (\Seen) {8957}
        [2010-03-13 16:38:26] 42< a0020 OK Idle completed.
        [2010-03-13 16:38:26] 42< + OK
        [2010-03-13 16:38:26] 42> Return-Path: [DELETED]
        .... MESSAGE FOLLOWS ......
        [2010-03-13 16:38:26] 42> 
        [2010-03-13 16:38:26] 42< * 4808 EXISTS
        [2010-03-13 16:38:26] Handling EXISTS
        [2010-03-13 16:38:26] cmd_handle_untagged: New mail in INBOX.BCC - 4808 
messages total.
        [2010-03-13 16:38:26] 42< * 1 RECENT
        [2010-03-13 16:38:26] 42< a0021 OK [APPENDUID 1066061063 16747] Append 
completed.
        [2010-03-13 16:38:26] IMAP queue drained

I don't see where a date-time is passed to APPEND.