[Dovecot] expire-plugin: configuration dict-server

Eric Toczek eric at flerd.com
Tue Aug 5 15:49:42 EEST 2008


Jens Meyer wrote:
>
> Unfortunately I have problems with the dictionary:
> -->
> dovecot: Aug 05 13:30:25 Error: dict: Unknown dict module: db
> dovecot: Aug 05 13:30:25 Error: dict: Failed to initialize dictionary
> 'expire'
>
Looking at the rpm it doesn't look like it has bdb support built in. But
it sounds like you want to use Mysql so that's alright.

>
> Are there any further tipps how to use the expire-plugin with
> mysql-connection (i.e. database-scheme, SQL-Select)?
You will need to setup your configuration like this:

dovecot.conf:

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


plugin {
...
expire = Trash 7 Trash/* 7 Spam 3 Junk 3
expire_dict = proxy::expiredict
...
}

dovecot-dict-expire.conf:
connect = host=<host> dbname=<db> user=<username> password=<password>
table = expire
select_field = timestamp
where_field = path
username_field = username


Then you'll want to create the table like so:
create table expire( username varchar(255) not null, path varchar(100)
not null, timestamp integer, primary key (username, path))engine=innodb;

That should work for you. Of course enter in  your correct config
location and your specific expire settings.

-Eric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20080805/42530365/attachment.bin 


More information about the dovecot mailing list