KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/share/doc/dovecot-1.0.7/wiki/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/dovecot-1.0.7/wiki/Plugins.Expire.txt
Expire plugin
=============

The /Expire/ plugin was created to keep track of mails in specific mailboxes,
and expunge them when they've been there for a specified amount of time.  It
keeps an internal database (Berkeley DB) of all such mailboxes, so it doesn't
have to go through all the mailboxes for all the users.  Unfortunately, this
plugin requires the CVS HEAD version of Dovecot, and it doesn't yet support
wildcards in its list of tracked mailboxes.

Example configuration
---------------------

---%<-------------------------------------------------------------------------
protocol imap {
  mail_plugins = expire
}
protocol pop3 {
  mail_plugins = expire
}

plugin {
  # Trash 7d, Spam 30d
  expire = Trash 7 Spam 30
}
---%<-------------------------------------------------------------------------

Cronjob equivalent
------------------

For Dovecot v1.0, this can be accomplished by running a daily shell script:

---%<-------------------------------------------------------------------------
# delete 30 day old mails
find /var/virtualmail/ -regex '.*/\.\(Trash\|Junk\)\(/.*\)?\/\(cur\|new\)/.*'
-type f  -ctime +30  -exec rm '{}'  \;
---%<-------------------------------------------------------------------------

(This file was created from the wiki on 2007-06-15 04:42)

Anon7 - 2021