Automatically delete mails from folders
You can do this with expire folder option, for example:
[root at mail kolab]# bin/cyradm -u diegows at xtech.com.ar localhost
IMAP Password: xxxxx
localhost.localdomain> mboxcfg INBOX/SPAM expire 10
localhost.localdomain> info INBOX/SPAM
{INBOX/SPAM}:
expire: 10
lastupdate: 10-Mar-2008 13:52:45 -0300
partition: default
size: 814377
localhost.localdomain>
Mails older than 10 days are automatically removed from INBOX/SPAM folder.
Another example, how to set expire option with python (2.5 required):
import imaplib
imap = imaplib.IMAP4('mail.xtech.com.ar')
imap.login('diegows at xtech.com.ar', 'xxxxx')
imap.setannotation('INBOX/SPAM', '/vendor/cmu/cyrus-imapd/expire',
'("value.shared" "30")')
--
DiegoWoitasen - 12 May 2008