Re: saving from IMAP folder F to F deletes
- To: mutt-users@xxxxxxxx
- Subject: Re: saving from IMAP folder F to F deletes
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Wed, 17 Dec 2008 15:35:29 -0600
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=aapaetUpwUx/vH4gKAbQsHQO9eI=; b=SZEG iFfZ8x2zbWWnzSz8Axo7RNaGdVTGevNl+s62rWywRCz81CQsRPL5hINp4J0ZBeEO jZ5Q+fYOgw+I1DUuY5Hs7p9aEYS69xjOAoDnlzS24RxKj/xqiz0drqTDR+QLRkL8 rRrFZJY23nLLi2C+ma3cogfRCxhjMw8E6geL6iI=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=BhZJD3fLB9zFeYQlmUzLHQd+1UtNo1G/3ZdAWjLQt+8ai9rxgaIo6nTqUegVLD1s1+tc/wZoDQRkMdy0Ljp3rC6QQuhjNX9vTThN0tWECKSzrOgc3yx7JyxemGwvJcfrXxd/T/tsBPMIqVA4yFFrVmwdg/qHwIc2Tqg9zNySSgE=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20081217211513.GA14974@xxxxxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20081217211513.GA14974@xxxxxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.18 (2008-11-30)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday, December 17 at 03:15 PM, quoth David Young:
> Today I have found that if I save a message M in IMAP folder F to
> the same folder F, and then I sync folder F by tapping '$', then
> message M is no longer present in F.
Interesting - I wonder if maybe your IMAP server is trying to be
helpful in a nonstandard way.
> This is different behavior than I expect for two reasons: saving a
> message should not be a destructive operation, no matter what the
> destination folder.
Unfortunately, the way it works normally is that "moving" a message
between IMAP folders is actually a copy-then-delete-the-original
operation. I believe the reason for this is buried in the problems of
dealing with multiple IMAP clients accessing the same folder (the
fewer semantics you have, the better), but I'm not certain. In any
case, mutt is showing you how things "really work". If you check out
the IMAP RFC, there's a "COPY" command, but not a "MOVE" command. So
all "move" operations are actually destructive operations
My guess is that what is happening is this: as always, mutt tells the
server to copy the message and then tells the server to delete the
original. On *MOST* IMAP servers, the copy operation will create a
duplicate message even if the destination is the same as the source.
However, I'm guessing that on your server, copying a message into the
folder it's already in is considered a no-op, so no actual copying
occurs. Then, when mutt deletes the original, it's deleting the *only*
copy of the message.
If that's what's going on, then your mail server is broken; the COPY
command is supposed to be able to create duplicate messages.
The way to test this is to see what happens when you use mutt's
<copy-message> function instead of <save-message> (by default,
copy-message is triggered by tapping C). When you copy a message from
a folder into the same folder, does your IMAP server produce a
duplicate message? If it doesn't, then we've found the problem: it's
not mutt, it's your IMAP server.
> Also, this behavior on IMAP folders is not consistent with the
> behavior on mbox-format folders, where saving to the same folder
> duplicates the affected message before marking it 'D'eleted---that
> is, the message is not destroyed.
That's because mutt has complete control over what goes on when it's
manipulating the mbox file itself. In the case of IMAP, it has to rely
on the server to do what it's supposed to.
> Two questions:
>
> 1 Is this behavior fixed in mutt version 1.4.2.3 or later?
> (I run Mutt 1.4.2.1i.)
If the problem really does lie in your IMAP server (as I think it
does), then the answer is no.
> 2 If the behavior is not fixed, where can I file a PR?
What IMAP server do you use?
~Kyle
- --
I have always found that mercy bears richer fruits than strict
justice.
-- Abraham Lincoln
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEUEARECAAYFAklJcKEACgkQBkIOoMqOI17D8ACYpeyGERBMvyJf6YfdJg8tKSUE
/QCg1Mf65HzMJuyYJ+EMYailUikc1mU=
=Vl8e
-----END PGP SIGNATURE-----