[Evolution-users] Mails :: Automatic expunge of local Trash folder

Milan Crha mcrha at redhat.com
Thu Jul 31 09:45:51 UTC 2025


On Thu, 2025-07-31 at 11:09 +0200, Matthias Kuntze wrote:
> For these trash folders I can define within "Properties" -> "Archive"
> a auto-cleanup period an the "Delete messages" action.

	Hi,
I guess using the Archive feature to cleanup the Trash folder is not
expected. It can be used, as you do, though kinda odd in my eyes. It
has its advantages too, like the defined period of time for how old
messages should be deleted. It's fine as a workaround for something not
really available in the app.

> Maybe the reason is that the trash is a virtual folder.

You are right, it's the reason. With a real Trash folder it's possible
to selectively delete the messages, but with a virtual Trash folder
it's not possible, not in a straightforward way. What is needed to
expunge only subset of the deleted messages is to do it in multiple
steps:
1. undelete messages not to be expunged
2. expunge the folder
3. delete messages undeleted in the step 1.

Anything can break between the three steps, it's not an atomic
operation, thus for example when you'd disconnect (for remote accounts)
or when the app crashes, the undeleted messages can be left undeleted
and cause a mess in the folder. I think evo does that in some rare
cases, despite the possible drawbacks.

> How is it possible to automatically clean the local trash folder
> from deleted messages?

There is File->Empty Trash which expunges all the Trash folders, but
really expunges, it removes everything from them all.

In Edit->Preferences->Mail Preferences->General tab->Delete Mail
section you can set evo to expunge the Trash folders periodically, but
it just calls the "File->Empty Trash" at predefined time for you, thus
it suffers of the same problem.

That being said, I do not see any automated way similar to the Archive
for the virtual Trash folders. A semi-automated way with preserved time
period for "keep in Trash just in case" can be to set archiving to move
to a new On This Computer/Expunge-me folder and mark the messages in
that folder for deletion. They will show up in the Trash as before, but
the difference is that when you'll select this Expunge-me folder you
can Folder->Expunge (Ctrl+E) in it, which will permanently delete the
messages marked for deletion only in that folder, not like in the Trash
folder, which expunges in all folders it uses as its subfolders.

Other people might suggest to not use the Trash as a "just in case the
message is needed" place. Then you could be able to use a real
"Archive" folder for this purpose and use the Expunge Trash folders on
exit feature, supposing you'll make sure all Trash folders will be used
in the same way, aka they will contain messages which you really want
to delete.

I know some mail providers automatically clean up messages in the
Trash/Junk folder after 30 days or so. They do it to save space on
their side, but it is a good idea too, to drop messages older than 30
days when they are in the Trash (or probably since they had been marked
for the deletion, which means to save somewhere when it was done). Evo
does not do it at the moment.

	Bye,
	Milan



More information about the evolution-users mailing list