Timo Sirainen wrote:
The only thing it needs is a trigger similar to PostgreSQL has in http://wiki.dovecot.org/Plugins/Expire.
Well, at least SQLite knows CREATE TRIGGER, which might be a good omen. ;-) Speaking of DB backends for the expire plugin, I experimented with MySQL in combination with Dovecot 1.1.16 as long as BerkeleyDB remains uncooperative. This is the mailbox layout:
john john/Admin/Foo john/Trash
sue sue/News/Bar sue/Trash
I'm using the sieve plugin to divert some incoming mail to john/Admin/Foo or sue/News/Bar respectively, but the 'expires' table in MySQL never shows entries for these two mailboxes. Moving mail manually to these two mailboxes (using Thunderbird) also fails to generate entries in 'expires'. So far, there are only two lines in the 'expires' table:
john/Trash sue/Trash
These were created after I deleted messages using Thunderbird. Have I misconfigured something? My dovecot.conf contains the following data:
protocol imap { mail_plugins = expire }
protocol lda { mail_plugins = cmusieve expire }
dict { expire = mysql:/etc/dovecot/dovecot-dict-expire.conf }
plugin { expire = Trash 1 Trash/* 1 Admin/Foo 3 */Admin/Foo 3 News/Bar 3 */News/Bar 3 */Foo 3 */Bar 3 expire_dict = proxy::expire sieve = /etc/dovecot/sieve/%u.sieve }
As you can see, I tried various patterns to refer to folders Foo and Bar, but it does not seem to work. Trash appears to be OK, though. BTW, these are the contents of /etc/dovecot/dovecot-dict-expire.conf:
connect = host=localhost dbname=db user=dbuser password=dbpass table = expires select_field = expire_stamp where_field = mailbox username_field = not_used
Could you please give me a hint? I am willing to stick with MySQL for the time being, but I have to get it working first. ;-)
-R