-----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-----