[Dovecot] expire-plugin: configuration dict-server
Jens Meyer
jm2 at jensmeyer.de
Tue Aug 5 16:12:12 EEST 2008
Hello Eric,
thank you very much for your prompt and helpful reply!
The connect seem to work fine now.
Please allow me two additional questions:
Is it correct that this database-table is only a "caching-table" which
is empty at first and will be filled later? It is not necessary to adapt
the SQL-statement to my user-configuration, is it?!
Is it necessary to reference the foldernames with "INBOX.Trash" or only
"Trash"? For Sieve I have to use "INBOX.Trash".
Actually nothing happens when trying the plugin with "dovecot
--exec-mail ext /usr/libexec/dovecot/expire-tool --test".
Thank you again,
kind regards!
Jens
Eric Toczek schrieb:
> 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
>
More information about the dovecot
mailing list