delprune on a single mailbox

Marcus Schopen lists at localguru.de
Fri Nov 6 08:40:17 EST 2015


Am Mittwoch, den 04.11.2015, 06:36 -0500 schrieb Adam Tauno Williams via
Info-cyrus:
> globally in cyrus.conf delprune is set to
> > > > > delprune	cmd="/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.

I set "mboxcfg user.test expire 1" on a test mailbox, but it has no
effect on nightly delprune set in cyrus.conf EVENT: 

  delprune cmd="/usr/sbin/cyrus expire -E 1 -X 7 -D 7" at=0501"

Messages deleted two days ago are still in the file system.

localhost> info user.test
{user.test}:
  duplicatedeliver: false
  expire: 1
  lastpop:  
  lastupdate:  4-Nov-2015 17:14:20 +0100
  partition: default
  pop3newuidl: true
  sharedseen: false
  size: 0


Any ideas?

Ciao!




More information about the Info-cyrus mailing list