Re: how to exclude subfolder from expiration using annotations?

2009-07-20 Thread Adam Tauno Williams
On Mon, 2009-07-20 at 18:24 +0200, Carsten Hoeger wrote:
> On Mon, Jul 20, Reinaldo de Carvalho wrote:
> > >> > I'm currently trying to find out how to use cyr_expire in combination 
> > >> > with
> > >> > annotations exluding one single subfolder per mailbox.
> > > [...]
> > >> Don't set expire for user (root) mailbox, only to "user/test1001/Sent 
> > >> Items".
> > > I want to _EXCLUDE_ user/test1001/Sent Items and not the other way around.
> > Do you try set annotattion for "user/test1001/Sent Items" with high
> > value (not to be reached)?
> No.
> Instead I wrote a patch for ipurge to accept a regex pattern to include or NOT
> to include folders matching that pattern.
> I'll send the patch as soon as I'm done.

+1, that sounds fabulous.


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: how to exclude subfolder from expiration using annotations?

2009-07-20 Thread Carsten Hoeger
On Mon, Jul 20, Reinaldo de Carvalho wrote:

> >> > I'm currently trying to find out how to use cyr_expire in combination 
> >> > with
> >> > annotations exluding one single subfolder per mailbox.
> >
> > [...]
> >
> >> Don't set expire for user (root) mailbox, only to "user/test1001/Sent 
> >> Items".
> >
> > I want to _EXCLUDE_ user/test1001/Sent Items and not the other way around.
> >
> 
> Do you try set annotattion for "user/test1001/Sent Items" with high
> value (not to be reached)?

No.
Instead I wrote a patch for ipurge to accept a regex pattern to include or NOT
to include folders matching that pattern.

I'll send the patch as soon as I'm done.

-- 
With best regards,

Carsten Hoeger


pgpEmYihBslCc.pgp
Description: PGP signature

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: how to exclude subfolder from expiration using annotations?

2009-07-20 Thread Reinaldo de Carvalho
On Mon, Jul 20, 2009 at 9:54 AM, Carsten Hoeger wrote:
> On Mon, Jul 20, Reinaldo de Carvalho wrote:
>
>> > I'm currently trying to find out how to use cyr_expire in combination with
>> > annotations exluding one single subfolder per mailbox.
>
> [...]
>
>> Don't set expire for user (root) mailbox, only to "user/test1001/Sent Items".
>
> I want to _EXCLUDE_ user/test1001/Sent Items and not the other way around.
>

Do you try set annotattion for "user/test1001/Sent Items" with high
value (not to be reached)?

> I want to expire everything BUT user/test1001/Sent Items.
>

-- 
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)

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: how to exclude subfolder from expiration using annotations?

2009-07-20 Thread Carsten Hoeger
On Mon, Jul 20, Reinaldo de Carvalho wrote:

> > I'm currently trying to find out how to use cyr_expire in combination with
> > annotations exluding one single subfolder per mailbox.

[...]

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

I want to _EXCLUDE_ user/test1001/Sent Items and not the other way around.

I want to expire everything BUT user/test1001/Sent Items.
 

-- 
With best regards,

Carsten Hoeger


pgpVjjpJLOyOK.pgp
Description: PGP signature

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: how to exclude subfolder from expiration using annotations?

2009-07-20 Thread Adam Tauno Williams
> 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:

Correct.  And I've been meaning to post the same question for awhile
now:  How to have message expiration in a folder and *not* for its
subfolders - short of setting an additional annotation on each
sub-folder (which in our circumstance isn't workable as the user can
create additional subfolders).

> $ 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?

My guess, is no.  FYI, purge exhibits the same behavior [as documented].
-- 
OpenGroupware developer: awill...@whitemice.org

OpenGroupare & Cyrus IMAPd documenation @



Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: how to exclude subfolder from expiration using annotations?

2009-07-20 Thread Reinaldo de Carvalho
On Mon, Jul 20, 2009 at 5:33 AM, Carsten Hoeger 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)

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html