[Dovecot] expire-tool

Jeff Rice python at finity.org
Thu Apr 23 01:03:35 EEST 2009


Hi,
I'm having some trouble getting the expire plugin to work, and I'm not 
sure where to turn for troubleshooting.

This is on 1.2rc3.

To my dovecot.conf, I've added:

mail_plugins = expire

under the protocol imap and lda sections.


I also added:

dict {
   expire = mysql:/etc/dovecot/dovecot-dict-expire.conf
}


plugin {
   expire = Trash 30 Trash/* 30 Spam 30
   expire_dict = proxy::expire
   auth_socket_path = /var/run/dovecot/auth-master
}

/etc/dovecot/dovecot-dict-expire.conf contains:
--
connect = host=/var/run/mysqld/mysqld.sock dbname=email user=XXX 
password=XXX

map {
   pattern = shared/expire/$user/$mailbox
   table = expires
   value_field = expire_stamp

   fields {
     username = $user
     mailbox = $mailbox
   }
}
--
I created the table and granted all permissions to the user.  The socket 
is the same one used by the auth_socket process, so that should work.

Dovecot restarts fine, but the table is empty.

A couple questions:
First, the mailboxes to expire are stored as user at domain/.INBOX.Trash. 
How should I list them in the conf file?  Also, is there any way to have 
the system come up to date since older emails already exist in those 
boxes and should be deleted.  Will it detect those, or only start to 
delete old emails that were delivered after the plugin was enabled?

Second, should the table be empty if mail has been delivered & deleted 
since I enabled the plugin?  I assumed it would start to fill.

Jeff


More information about the dovecot mailing list