Auto-deletion of messages in Junk-folder after a certain time

Marten Lehmann lehmann at cnm.de
Tue Jul 15 11:03:13 EDT 2008


Hi,


>> Being the filty perl programmer that I am, I would just make an admin
>> IMAP connection to the server, LIST all mailboxes, regex match the ones
>> I wanted, select them and process them.
> 
> I used to do the same , But I found a client connection script too slow
> & too heavy for my server with 40k mailboxes 

we have more than 40.000 mailboxes, too. But I'm not very enthusiastic
to use ipurge. I'm afraid ipurge does something wrong (due to bugs or
misconfiguration) and some unexpected messages are deleted. I wouldn't
have a good feeling to tell customers "ipurge is always right" without
having logs.

My preferred solution would be to log each mailbox I'm deleting messages
from and the From, Date and Subject-header of each, so in case of
accidents, the customers could restore the messages somehow.

I wouldn't mind a slow perl script that does its job one by one as long
as I get logs.

@Bron: I don't want to delete all messages, but all messages older than
60 days. Instead of flagging messages, I thing UIDEXPUNGE might be an
option.

Kind regards
Marten Lehmann



More information about the Info-cyrus mailing list