how to exclude subfolder from expiration using annotations?

Reinaldo de Carvalho reinaldoc at gmail.com
Mon Jul 20 07:44:08 EDT 2009


On Mon, Jul 20, 2009 at 5:33 AM, Carsten Hoeger<choeger at open-xchange.com> wrote:
> Hi,
>
>
> I'm currently trying to find out how to use cyr_expire in combination with
> annotations exluding one single subfolder per mailbox.
>
> I'm running RHEL5 with v2.3.7-Invoca-RPM-2.3.7-2.el5_3.2.
>
> What I did:
>
> . setannotation "user/test1001" "/vendor/cmu/cyrus-imapd/expire" ("value.shared" "1")
> . OK Completed
>
> . getannotation user/test1001 "/vendor/cmu/cyrus-imapd/expire" "value.shared"
> * ANNOTATION "user/test1001" "/vendor/cmu/cyrus-imapd/expire" ("value.shared" "1")
> . OK Completed
>
> Now I want to exclude the "Sent Items" folder from expiring, so I did
>
> . setannotation "user/test1001/Sent Items" "/vendor/cmu/cyrus-imapd/expire" ("value.shared" NIL)
> . OK Completed
>
> But that does not work:
>
> $ su - cyrus -c '/usr/lib/cyrus-imapd/cyr_expire -E 3 -v'
> expiring messages in user.test1001 older than 1 days
> expiring messages in user.test1001.Drafts older than 1 days
> expiring messages in user.test1001.Junk older than 1 days
> expiring messages in user.test1001.Sent Items older than 1 days
> expiring messages in user.test1001.Trash older than 1 days
> expiring messages in user.test1001.confirmed-ham older than 1 days
> expiring messages in user.test1001.confirmed-spam older than 1 days
> expiring messages in user.test1001.subfolder older than 1 days
> expiring messages in user.test1001.subfolder.subsubfolder older than 1 days
> expiring messages in user.test1001.subfolder.subsubfolder.subsubsubfolder older than 1 days
>
> In the cyr_expire manpage I read:
>
>
> [...]
>
> The  value  of  the /vendor/cmu/cyrus-imapd/expire annotation is inherited by
> all children of the given mailbox, so an entire mailbox tree can be expired by
> seting a single annotation on the root of that tree.  If a mailbox does not
> have a /vendor/cmu/cyrus-imapd/expire annotation set on it (or does not
> inherit then no messages are expired from the mailbox.
>
> [...]
>
> I found no further resources describing how to achieve what I want.
> Is that possible at all?
>

Don't set expire for user (root) mailbox, only to "user/test1001/Sent Items".

If you really want expire anothers mailbox with 1 day, then the easy
way is set high value to "user/test1001/Sent Items".

Read the cyr_expire man to learn the option to enable annotation flag.
By default expire annotation is ignored.

-- 
Reinaldo de Carvalho
http://korreio.sf.net
http://python-cyrus.sf.net

"Don't try to adapt the software to the way you work, but rather
yourself to the way the software works" (myself)


More information about the Info-cyrus mailing list