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 301388 - RFE: "Delete this" means "Expunge this" if already in Trash
RFE: "Delete this" means "Expunge this" if already in Trash
Status: RESOLVED OBSOLETE
Product: evolution
Classification: Applications
Component: Mailer
2.22.x (obsolete)
Other Linux
: Normal enhancement
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 316375 324463 337198 350920 353249 528687 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-04-20 20:22 UTC by Ed Halley
Modified: 2021-05-19 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds a method to Camel.Folder to allow a selected set of uids to be expunged. (2.19 KB, patch)
2008-02-21 10:33 UTC, Aidan Delaney
rejected Details | Review

Description Ed Halley 2005-04-20 20:22:14 UTC
If a user tries to delete one or more items from the Trash folder, then they
should be expunged.  This helps the user clean up a large assortment of trash
quickly.  For example, spam-filters may be deleting many messages, but the user
may want to weed out a number of obvious spam so that any false-positive "ham"
messages can be found and recovered.  Being able to eradicate some of the
obvious spam before "Expunge (all) Trash" would be useful.

(Sorry if this feature is already available after 2.0.4; not everyone runs the
bleeding edge.)
Comment 1 Not Zed 2005-07-29 02:08:42 UTC
not possible with our mail abstraction
Comment 2 Ed Halley 2005-08-31 21:42:01 UTC
I'd like to know how it's "not possible," since the user interface is already
aware of the difference between messages in the trash, and messages not in the
trash.  Right-click a message and you get the opportunity to "undelete" those
messages.

If you're saying you can't eradicate a single message from the database, again,
why is this impossible?
Comment 3 André Klapper 2005-09-15 20:36:35 UTC
*** Bug 316375 has been marked as a duplicate of this bug. ***
Comment 4 Karsten Bräckelmann 2006-01-21 00:18:12 UTC
*** Bug 324463 has been marked as a duplicate of this bug. ***
Comment 5 Karsten Bräckelmann 2006-01-21 00:20:17 UTC
Removing mails physically that are "deleted" in the Trash folder really would be a great feature.
Comment 6 Karsten Bräckelmann 2006-04-04 15:40:56 UTC
*** Bug 337198 has been marked as a duplicate of this bug. ***
Comment 7 André Klapper 2006-07-04 12:40:31 UTC
updating version number.
Comment 8 André Klapper 2006-08-12 14:07:43 UTC
*** Bug 350920 has been marked as a duplicate of this bug. ***
Comment 9 Karsten Bräckelmann 2006-08-28 17:10:20 UTC
*** Bug 353249 has been marked as a duplicate of this bug. ***
Comment 10 Jeff Cai 2007-08-31 03:07:15 UTC
In fact, trash folder is a virtual folder which means there's no a real physical folder called "Trash". All messages that have been marked "Deleted" will be put into "Trash" folder. For IMAP protocol, there's no command that we can only remove only one message that marked as "Deleted", hence we have no way to do that.
Comment 11 Jeffrey Stedfast 2007-08-31 16:46:01 UTC
As NotZed and Jeff Cai have hinted at, the IMAP4rev1 protocol does not have a way to expunge specific messages, rather the EXPUNGE command purges all messages in the folder with the \Deleted flag.

There does, however, exist an extension called UIDPLUS which adds functionality to the EXPUNGE command allowing one to specify which message uids to purge.


Adding this feature for IMAP providers which support this extension could be done, just need to have some way of letting the user know why the feature doesn't work for some IMAP servers.

My thinking is that camel_folder_expunge() could be modified to take a GPtrArray *uids argument, and, if non-NULL, issue a UID EXPUNGE <uid-set> command if the server supports it... otherwise it should maybe throw an exception saying that the server doesn't support this feature.

Note: it is important not to try and simulate this functionality by removing the \Deleted flag from messages not in the uid list, calling EXPUNGE, and then re-setting the \Deleted flag because this approach is not atomic and could lead to messages being lost.
Comment 12 Jeff Cai 2007-09-01 09:15:39 UTC
Does Community have the plan to support UIDPLUS extension when expunging mails?
Comment 13 Jeff Cai 2007-09-13 09:53:59 UTC
Jeffery, how about local mail box or pop3 mail server? The trashes in local is a virtual folder as well, how to implement this feature for them?
Comment 14 Aidan Delaney 2008-02-21 10:10:27 UTC
Jeff,
On local storage the mail can simply be rm'ed from the MailDir and the summary updated.  Using POP 3, from the spec (RFC 1939)

DELE msg

         Arguments:
             a message-number (required) which may NOT refer to a
             message marked as deleted

         Restrictions:
             may only be given in the TRANSACTION state

         Discussion:
             The POP3 server marks the message as deleted.  Any future
             reference to the message-number associated with the message
             in a POP3 command generates an error.  The POP3 server does
             not actually delete the message until the POP3 session
             enters the UPDATE state.

         Possible Responses:
             +OK message deleted
             -ERR no such message

         Examples:
             C: DELE 1
             S: +OK message 1 deleted
                ...
             C: DELE 2
             S: -ERR message 2 already deleted

It seems that it should be possible to have expunge as a per-message operation rather than the current per-folder operation.  This would mean tweaking each Camel.Provider.
Comment 15 Aidan Delaney 2008-02-21 10:33:14 UTC
Created attachment 105688 [details] [review]
Adds a method to Camel.Folder to allow a selected set of uids to be expunged.
Comment 16 Aidan Delaney 2008-02-21 10:34:27 UTC
The above patch is a start of adding the required method to the Camel API.  It's an e-d-s change.  Is this the correct way of approaching the issue?
Comment 17 Srinivasa Ragavan 2008-02-21 12:25:46 UTC
Jeff Cai, The UIDPLUS extn is sort of there in the current provider itself.

		if (store->capabilities & IMAP_CAPABILITY_UIDPLUS) {
			response = camel_imap_command (store, folder, ex,
						       "UID EXPUNGE %s", set);
		} else

Just the provisions/UI need to be implemented and base classes has to be implemented.

Adian, First of all this patch wasn't right and it isn't OO to add function overloading :) it is plain C programming. 

You need to write a new function and also a store flag whether if it supports UID_EXPUNGE. And only if it supports the impl needs to be called and UI should be enabled.
Comment 18 Milan Crha 2019-01-03 17:39:29 UTC
*** Bug 528687 has been marked as a duplicate of this bug. ***
Comment 19 André Klapper 2021-05-19 11:46:10 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. 
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org (resources are unfortunately quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/evolution/-/issues/

Thank you for your understanding and your help.