Is it possible to clean the trash folder automatic?
Ben Poliakoff
benp at reed.edu
Mon Oct 11 14:32:46 EDT 2004
Don't know if others have replied to you directly already...
* Adi Linden <adil at adis.on.ca> [041010 08:46]:
> This almost answers the same question I had.
>
> On Sun, 10 Oct 2004, Bob Tito wrote:
> > purgetrash cmd="ipurge -d 7 -f user/%/Trash" at=0200
>
> Does this also remove old message from anything below user/%/Trash, like
> user/%/Trash/SPAM and user/%/Trash/Virus?
The above "purgetrash" event is not recursive. It should only operate
on user/*/Trash (INBOX/Trash, from the user's point of view).
Mailboxes fitting the pattern, "user/%/Trash/SPAM" would be untouched.
One advantage of this method is that it will work on any mailbox that
matches the "user/%/Trash".
One disadvantage is that it will operate on "user/%/Trash" without the
possibility of any exceptions.
> On Sun, 10 Oct 2004, Jukka Salmi wrote:
> > In cyradm, try 'mboxcfg user.%.Trash expire 20'.
>
> Once this has been configured, which part of the configuration takes care
> of the actual deleting of messages?
cyr_expire does the work of purging messages that have expired (see the
man page for cyr_expire for more details). It is usually configured as
an event in cyrus.conf.
I think this is probably the more graceful solution (using mboxcfg to
set expiration flags in the box's metadata). You can use the mboxcfg
command within cyradm to recursively set the expire annotation on a
large range of mailboxes.
One disadvantage of this method is that the expire annotation will not
be automatically applied to new accounts' Trash folders. You might need
to integrate the expire annotation into your account creation routines.
One advantage of using the expire annotation is that users can
potentially specify how long they want mail in the specified mailbox to
hang around before it expires (or if they want mail in the specified
folder to expire at all!). For end users a web based interface to make
these tweaks would probably be preferable.
These are, of course, only my opinions.
Ben
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus
mailing list