Release Support > Requests

Empty trash older than...

(1/2) > >>

nurbles62:
It is great to have an option to empty trash automatically on logout.

It would be even greater if it were possible to to automatically empty trash older than a configurable time period on logout.  That way, one could still "trust" in the ability to recover items from trash, if necessary, for at least that time period.

Is there any chance that this is possible?

JohnDoh:
That is a job for the IMAP server. Delete trash messages older than x. That way it works regardless of if a user is connecting via Roundcube or not.

nurbles62:
First, I have looked at my mail directories on the server and found that I have three different trash folders.  One created when I was using Squirrelmail, of created when I replaced Squirrel with Roundcube, and the third created when I added my IMAP account to my android phone's mail client.  That pretty clearly indicates that the trash folders belong to the CLIENT rather than the server.

Second, I have been looking at RFC-3501 IMAPv4 to see what it says about the trash folder.  It says nothing.  The word trash does not occur in the RFC.  However, there IS a way (FLAGS) for an IMAP client to set (or clear) the /Deleted flag for any messages it desires and then to use EXPUNGE to actually remove any messages with the /Deleted flag set.  Since roundcube is able to format and display the dates in the messages, it seems like it should be possible for Roundcube to mark all messages older than X days for deletion when I ask to empty my trash.

I cannot find anything like that in the IMAP protocol, though individual IMAP server may implement extensions, I suppose.  But I don't think that Roundcube is trying to get locked in to a limited number of IMAP servers.

JohnDoh:
You are correct this is nothing to do with IMAP itself. Perhaps I should have just said server rather than IMAP server but I didnt want you to think I meant the web server.

For example in my setup I use the SPECIAL-USE extension so the IMAP server can tell clients which folder is which, they all use the same folders for drafts, junk, and trash (or at least all clients that support speical use do) to save me configuring it each time. Then separatly I have cron task that deletes any message older than 30days from the junk or trash folders.

Some IMAP servers do have tools for jobs like this, for example, Doveadm-Expunge.

If you want a configurable per user solution that is configurable from Roundcube you are going to need some kind of plugin - either one that allows you to change settings stored on the server or one that actually does the work (again this would only work when you are logged in to roundcube)

alec:
Cyrus IMAP for example has cyr_expire utility which can be controlled by users via IMAP using folder annotations.

Navigation

[0] Message Index

[#] Next page

Go to full version