Re: delprune on a single mailbox

2015-11-04 Thread Adam Tauno Williams via Info-cyrus
globally in cyrus.conf delprune is set to
> > > > delprunecmd="/usr/sbin/cyrus expire -E 1 -X 7 -D 7"
> > > > at=0501
> > > > For a single mailbox I don't want to keep deleted mails for 7
> > > > days,
> > > > but
> > > > expire them immediately or once a day per cron. How to do that?
> > > Forogt to say that delete_mode and expunge_mode is set to
> > > delayed.
> > > Via cron this should work for an immediate cleanup/expire:
> > You can set an expire annotation per mailbox.  
> How do I do that? From cyr_expire manpage:
> "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 one), then no messages are
> expired from the mailbox."

Via cyradm -

cyrus.example.com> mboxcfg user.adam expire 365 
cyrus.example.com> info user.adam 
{user.adam}: 
  condstore: false 
  duplicatedeliver: false 
  expire: 365 
  lastpop:  
  lastupdate: 13-Aug-2008 19:37:31 -0400 
  partition: default 
  sharedseen: false 
  size: 12325671

AFAIK the annotations supported by cyradm/mboxcfg are:

* comment – A free-form text comment or description to be attached to
the mailbox.
* condstore – This annotation is only supported in the 2.3.x release
series starting with 2.3.3 although its use is not recommended until
2.3.8. As of the 2.4.x release series CONDSTORE functionality is
enabled on all mailboxes regardless of annotation and attempting to set
this annotation will result in a permission denied message. On releases
where this annotation is supported setting a value of “true” will
enable CONDSTORE functionality1.
* expire – If an expire value is provided messages will be
automatically deleted from the mailbox once the specified number of
days has elapsed.
* news2mail - 
* sharedseen - Enables the use of a shared \Seen flag on messages
rather than a per-user \Seen flag. The 's' right in the mailbox ACL
still controls whether a user can set the shared \Seen flag.
* sieve – In the case of a shared folder the “sieve” parameter
specifies the name of a global SIEVE script that will be used for every
message delivered to the folder.  This value is ignored for personal
mailboxes (mailboxes including and subordinate to a user's INBOX).
* squat – Flags the mailbox to be included for indexing when the SQUAT
process performs index generation.


> But is it possible to expunge a message immediately when it's deleted
> by client and not with the next expire run?

Not if delayed expunge is enabled AFAIK; that would defeat the purpose.

-- 
Adam Tauno Williams  GPG D95ED383
OpenGroupware Developer 



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

reconstruct segfault, questions regarding databases

2015-11-04 Thread Stephan via Info-cyrus

Hi there,
 
I'm trying to migrate cyrus to new servers which means the 32 bit machines will 
be replaced by 64 bit and 2.4.17 will be replaced by 2.5.6. Almost all 
databases should already be skiplist. To test the migration I restored the 
mailspool and made sure ownership is correct. Now if I run reconstruct -V max 
as the cyrus user, reconstruct crashes every couple of mailboxes leaving a log 
entry I don't understand, e.g.: 

reconstruct[21388]: WARNING: trying to rename cache file user.username.Folder 
(1 < 2)
reconstruct[21388]: IOERROR: failed to load cache for user.username.Folder
reconstruct[21388]: user.username.Folder: missing cache file, recreating
kernel: [174505.936323] reconstruct[21388]: segfault at 4 ip 7ff81bddda58 
sp 7fff88baa060 error 4 in libcyrus_imap.so.0.0.0[7ff81bdb+6b000]

I don't see where that IOERROR could have come from, the cache file for the 
folder in question is there and accessible. On the next run of reconstruct this 
mailbox will be finished, but reconstruct will crash on another mailbox, so if 
I run it several times all mailboxes should be ok. It just doesn't seem very 
trustworthy...

Another error I don't understand is 

DBERROR db5: Program version 5.1 doesn't match environment version blabla
quota[2478]: DBERROR: dbenv->open '/var/spool/imap/db' failed: 
DB_VERSION_MISMATCH: Database environment version mismatch

'/var/spool/imap/db' is a directory, so how can there be a database mismatch ? 
Inside this directory there are a couple of __db* files, that 'file' doesn't 
recognize, but also a file named log.10 that seems to be bdb. What are they 
and should they be deleted before the reconstruct ?

Is there an advantage of choosing a single quota db rather than quotalegacy ? 
Would the usage of a single db file in twoskip format be faster ?

Regards,
Stephan

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: delprune on a single mailbox

2015-11-04 Thread Marcus Schopen via Info-cyrus
Am Dienstag, den 03.11.2015, 08:24 +0100 schrieb Marcus Schopen via
Info-cyrus:
> Hi,
> 
> Am Montag, den 02.11.2015, 10:58 -0500 schrieb Adam Tauno Williams via
> Info-cyrus:
> > On Sun, 2015-11-01 at 14:40 +0100, Marcus Schopen via Info-cyrus wrote:
> > > Am Sonntag, den 01.11.2015, 13:35 +0100 schrieb Marcus Schopen via
> > > Info-cyrus:
> > > > Hi,
> > > > globally in cyrus.conf delprune is set to
> > > > delprunecmd="/usr/sbin/cyrus expire -E 1 -X 7 -D 7" at=0501
> > > > For a single mailbox I don't want to keep deleted mails for 7 days,
> > > > but
> > > > expire them immediately or once a day per cron. How to do that?
> > > Forogt to say that delete_mode and expunge_mode is set to delayed.
> > > Via cron this should work for an immediate cleanup/expire:
> > 
> > You can set an expire annotation per mailbox.  
> 
> How do I do that? From cyr_expire manpage:
> 
> "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 one), then no messages are expired from the
> mailbox."
> 
> Is this correct?
> 
> setannotation "user.myuser"
> "/vendor/cmu/cyrus-imapd/expire" ("value.shared" "0")
> 
> But is it possible to expunge a message immediately when it's deleted by
> client and not with the next expire run?

Sorry, but could someon explain how and where to set annotation?
cyradmin seems not to be the right tool.

Ciao!




Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus