help with cyr_expire please
Wesley Craig
wes at umich.edu
Sun Jul 27 17:25:32 EDT 2008
On 27 Jul 2008, at 16:17, Per olof Ljungmark wrote:
> Wesley Craig wrote:
>> If you're getting a message like this:
>> expiring messages in ... older than ... days
>> that's the result of the /vendor/cmu/cyrus-imapd/expire annotation
>> being set. It's controlled with the -E flag. A spam dump is a
>> pretty typical place to find an annotation like that.
>
> none of the mailboxes had such an annotation but I'm not ready to
> completely rule this out yet.
>
> but if there is not such an annotation in place, exactly where does
> cyr_expire fetch the info on to expire or not?
The message:
expiring messages in ... older than ... days
is inside the check for whether the annotation is set. So if you got
that message, the annotation *is* set. Somewhere. According to my
reading of cyr_expire.c, if you don't want annotations checked, you
should give the -a flag. If you don't give -a, it will check each
mailbox and every parent of every mailbox, recursively up to "server"
or "domain" for the "/vendor/cmu/cyrus-imapd/expire" annotation. If
it finds the "/vendor/cmu/cyrus-imapd/expire" annotation (which will
be stored in the global annotations.db), then instead of cleaning up
already expunged messages, it will delete messages that are older
than the age stored as the value of the attribute.
For a particular mailbox, if the annotation doesn't apply (to the
mailbox or anywhere above it), and expunge_mode is delayed, then a
"cleanup" is done, i.e., expunged messages are deleted.
It appears to me that if you set the annotation to "0", you might
still get odd behavior. A value of "0" (string) is still a value, so
the "cleanup" flag won't get set. On the other hand, the expire_mark
will get set to 0 (int) and the "force" aka "expire" flag will be
set. *Probably* nothing really awful will happen in this case,
because it will be hard for the sentdate of messages to be less-than
0 (at least for a few years...). None the less, I sort of feel like
the annotation value should be converted from a string to an int
sooner rather than later -- it's used as a comparison all through the
cyr_expire code.
Another funny thing: the report:
expunged ... out of ... messages from ... mailboxes
applies to "expired" or "cleaned up" messages. Not very clear book
keeping, I'd say. It would be vastly superior if we reported on a
per mailbox basis, and were clear which behavior was performed, i.e.,
deleting otherwise active messages or expiring messages that have
been previously expunged.
:wes
More information about the Info-cyrus
mailing list