[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: remove old trash from imap, server side

On Thu, 2005-12-29 at 14:47 +0800, Chris Purves wrote:
> Hello,
> I am running courier IMAP using maildirs.  I would like to know what
> is the best way for removing mail from the trash folder that are older
> than six months.
> Is there any functionality built into courier or should I make a cron
> job?  What are others doing?

From '/etc/courier/imapd':

# The following setting is optional, and causes messages from the given
# folder to be automatically deleted after the given number of days.
# IMAP_EMPTYTRASH is a comma-separated list of folder:days.  The default
# setting, below, purges 7 day old messages from the Trash folder.
# Another useful setting would be:
# IMAP_EMPTYTRASH=Trash:7,Sent:30
# This would also delete messages from the Sent folder (presumably
# of sent mail) after 30 days.  This is a global setting that is applied
# every mail account, and is probably useful in a controlled, corporate
# environment.
# Important: the purging is controlled by CTIME, not MTIME (the file
# as shown by ls).  It is perfectly ordinary to see stuff in Trash
# a year old.  That's the file modification time, MTIME, that's
# This is generally when the message was originally delivered to this
# mailbox.  Purging is controlled by a different timestamp, CTIME, which
# changed when the file is moved to the Trash folder (and at other times
# You might want to disable this setting in certain situations - it
# in a stat() of every file in each folder, at login and logout.

Adam James <ad@heliosphan.co.uk>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: