Deleting messages "marked for deletion" older than X days

Gerard Beekmans gbeekmans at
Mon Aug 18 17:53:31 EDT 2008

Hi Ken,

 From the description it seems like cyr_expire will apply to every email 
in a mailbox. I don't want to delete any regular emails other than the 
ones already marked for deletion by an email client who is lacking a 
decent purge feature.

Gerard Beekmans
IT Manager
Achilles Media
Tel: 403-678-1216 ext. 102
Email: gbeekmans at

Kenneth Marshall wrote:
> I think that the cyr_expire command may be what you are searching
> for.
> Ken
> On Mon, Aug 18, 2008 at 03:35:20PM -0600, Gerard Beekmans wrote:
>> Hi,
>> I am looking for a way to run a daily script on the Cyrus IMAP server 
>> that processes every user's mail folders and deletes every message 
>> marked for deletion older than X days.
>> I realize the proper way to do this is client-side and have the client 
>> program purge/expunge the mailboxes periodically in some fashion.
>> Unfortunately in the corporate world there are many clients who still 
>> use old versions of Outlook that only marks a message for deletion and 
>> will not automatically purge the folder.
>> To force users to manually purge every single folder they have, one 
>> folder at a time as some versions of Outlook can't do this recursively, 
>> is not a feasible option. Users just stopped doing this because it 
>> becomes too time consuming a task.
>> So I'm looking for a server-side solution that analyzes every mail 
>> folder on the system, finds marked messages older than X days and 
>> purges/deletes them on the client's behalf.
>> Some pointers are appreciated. I can write the scripts (shell, perl, 
>> whatever) myself if need be, just need to know how to start going about 
>> obtaining such a specific list of messages.
>> Thanks,
>> -- 
>> Gerard Beekmans
>> IT Manager
>> Achilles Media
>> Tel: 403-678-1216 ext. 102
>> Email: gbeekmans at
>> ----
>> Cyrus Home Page:
>> Cyrus Wiki/FAQ:
>> List Archives/Info:

More information about the Info-cyrus mailing list