After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 206339 - message marked deleted but not expunged in the source folder when moving between two IMAP folders
message marked deleted but not expunged in the source folder when moving betw...
Status: RESOLVED DUPLICATE of bug 206061
Product: evolution
Classification: Applications
Component: Mailer
unspecified
Other All
: Normal minor
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 206394 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-08-04 05:53 UTC by Ovidiu Gheorghioiu
Modified: 2001-10-03 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ovidiu Gheorghioiu 2001-08-04 05:54:18 UTC
Package: Evolution
Priority: Normal
Version: 0.12.99
Synopsis: message marked deleted but not expunged in the source folder when moving between two IMAP folders
Bugzilla-Product: Evolution
Bugzilla-Component: Mailer

Description:
When I move a message (using Move To Folder) to another folder in the same IMAP mailbox, the message is marked deleted but not expunged. 
This is a problem because now I have two copies of the msg in the mailbox, and the msg shows in the Trash. If I keep moving it around, it shows up that many times in Trash.

Using Cyrus IMAP4 v1.5.19 server over a stunnel connection.


Unknown reporter: ovy@iname.com, changed to bugbuddy-import@ximian.com.

Comment 1 Ovidiu Gheorghioiu 2001-08-04 06:01:32 UTC
Just checked - the above does not happen when moving msgs via filters.
Comment 2 Luis Villa 2001-08-07 23:24:24 UTC
Hrm. Maybe move should automatically expunge? 
Comment 3 Jeffrey Stedfast 2001-08-07 23:30:25 UTC
no, because that would mean that all messages marked for deletion
would be removed and this is not the desired behavior because some
people like to mark messages as deleted and keep them forever. This is
their way of "archiving" mail. 

Don't ask, I have yet to figure out the logic in that myself.

anyways, there's a bug about filters expunging folders being "wrong"
but I just haven't fixed it yet (we can't figure out what the correct
thing to do is, some people like this guy want it to expunge but many
other people don't want it to expunge - feeling our pain and suffering
yet?)
Comment 4 Luis Villa 2001-08-08 01:38:01 UTC
I know this doesn't seem to be the usual solution around these parts,
but maybe we could offer a preference for this?
Comment 5 Peter Williams 2001-08-08 14:54:23 UTC
You really don't want to automatically expunge things -- the
distinction between deleting and expunging saves your butt if you
accidentally mark something as deleted, and automatically expunging
things at seemingly random times messes up this butt-saving behavior.

IMHO this is NOTABUG, because the multiple copies of the message in
the trash are only vfolder copies, not actual copies.
Comment 6 Ovidiu Gheorghioiu 2001-08-08 22:21:31 UTC
I think the multiple copies ARE actual copies -- the message DOES
reside in more mailboxes, albeit it has the deleted flag set in all
but one. So this IS a problem, esp. if you guys eliminate expunging on
filters as well. Some of us have IMAP quotas, and if most of your
incoming mail gets filtered to different mboxes the quota is in effect
halved. 

On the other hand, expunging a whole mailbox on moves is bad too.

Maybe you guys should reconsider supporting a "true" Trash folder
which will solve this problem.

And yes, people do want deleted msgs to stick around for a while, just
in case -- losing an important email by hitting Delete at the wrong
time (like just before filtering) is really painful.
Comment 7 Jeffrey Stedfast 2001-08-08 22:36:57 UTC
how would having a "real" trash folder solve this problem? it
wouldn't.
Comment 8 Ovidiu Gheorghioiu 2001-08-08 23:53:29 UTC
With a Trash folder you get both benefits: 1) no multiple copies of
the message, and 2) being able to move / filter mail without losing
your deleted messages (now you can safely expunge after a move -- any
deleted messages are in the Trash folder). 

I know it's slower, but that's why we have the nice multithreading in
Evo for :)

I'm really curious as to why the IMAP people chose not to allow
expunging a single message. 
Comment 9 Jeffrey Stedfast 2001-08-09 17:31:39 UTC
mark crispin, the "imap guy" believes that mail clients should use
virtual Trash folders.

I read an archived thread on this a while back...
Comment 10 Dan Winship 2001-08-09 20:02:39 UTC
Jeff: Once again in your rush to belittle our users, you miss
the point. I don't think anyone wants to keep their deleted mail
forever, people just want the ability to recover recently-deleted
messages without having Evo expunge the folder at random times.


Having a real trash folder wouldn't help, because IMAP doesn't
have a MOVE command: the only way to move a message is to COPY
it and then mark the original deleted. And then potentially
EXPUNGE. So you'd solve the problem with the message appearing
multiple times in the trash, but you'd still have to either
expunge at random, or have the message take up space as a
deleted message in the source folder.


There are a few things we can do here. First, if the server
supports UIDPLUS (which current versions of Cyrus do), we *can*
expunge individual messages, and so we should update the IMAP
move code to do that. (This is very easy.)

If the server doesn't support UIDPLUS, we can hack around it
by un-deleting the messages we don't want to expunge, expunging,
and then re-deleting the ought-to-be-deleted messages. The
IMAP provider already has code to do this, so this is also
easy, although it's potentially slow. But maybe this is the best
solution?

(Another possibility would be to store a "moved" flag on the
moved messages, and have them not show up in the vtrash or when
"Hide Deleted Messages" is off if they have that flag. But this
would actually be really hard because there would no longer be
a one-to-one mapping between IMAP sequence numbers and summary
indexes.)
Comment 11 Ovidiu Gheorghioiu 2001-08-09 23:54:39 UTC
About the Trash folder: yes it *would* solve the problem, because now
you don't keep your deleted messages in the folders, so if you expunge
 the folders at random times that's not a problem, there should be no
messages with the delete flag anyways. Except, of course, the one(s)
you've just moved.

Netscape does that and I've had no problems with it. True, delete is
slower, but it might be worth it. 

Of course, the ideal solution is the one Dan just mentioned, deleting
one at a time. The UIDPLUS things is probably very fast, it would be
interesting to see how the non-UIDPLUS hack compares (in terms of
speed) to moving to another folder and expunging (i.e. Trash folder).
Comment 12 Peter Williams 2001-08-10 00:03:53 UTC
No, a physical trash folder wouldn't help... how are your messages
going to get in there? With the IMAP COPY command. Which means you
have to delete them from the source folder. Which puts us in the same
problem as before.

If IMAP supported some mode command like
PUT_ALL_DELETED_MESSAGES_IN_THIS_FOLDER, that would be one thing, but
I have yet to see this implemented. I assume Netscape does something
like the delete-only-one hack or just hides duplicates.
Comment 13 Ovidiu Gheorghioiu 2001-08-10 03:55:58 UTC
It's true that you have to expunge, but you *don't care*, because your
older deleted messages are in Trash, so they will not be affected by
the expunge in, say, Inbox. 

Right now in Evo, because there's no Trash folder, older messages you
delete in Inbox are still in Inbox, so you *do* care if Inbox gets
expunged. 

I just checked with Netscape, and this is exactly what it does: COPY
msg to Trash, EXPUNGE Inbox. If there are deleted messages in Inbox
(like from Evo), tough luck, but the ones deleted from Netscape are
safely in Trash. If you're *always* using a Trash folder, then
expunges are OK, because all deleted messages have already been copied
to Trash.

I hope this sheds some light on the issue.
Comment 14 Dan Winship 2001-08-10 18:29:43 UTC
Ah. Indeed.

So, I think having a real trash folder option is probably the
right thing, but that will have to be post-1.0. For now we
can at least do UID EXPUNGEs though.
Comment 15 Frederik 2001-08-30 16:51:30 UTC
*** bug 206394 has been marked as a duplicate of this bug. ***
Comment 16 Dan Winship 2001-10-03 13:56:29 UTC
Since the eventual consensus was "you should be able to choose
to have a physical trash folder", I'm marking this bug a duplicate
of that bug. There is also now another bug for the UID EXPUNGE
behavior.

*** This bug has been marked as a duplicate of 206061 ***