[Dovecot] expire plugin: columns not uniq

Nikita Koshikov koshikov at gmail.com
Wed Aug 19 13:33:08 EEST 2009


Hello list,

My dovecot setup have expire plugin enabled. It is working fine: new records added to database(sqlite), expire-tool successfully expunges old mail, but when expire-tool try to update database record for processed user, I get error in logs:

root at mail dovecot 0:0 # /usr/sbin/dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh --test
Info: koshikov.n at domain.com/Spam: timestamp 1250622406 (Tue Aug 18 22:06:46 2009) -> 1250684287 (Wed Aug 19 15:18:07 2009)


in logs:
Aug 19 13:29:11 dict: Error: sqlite: exec(INSERT INTO expires (expire_stamp,username,mailbox) VALUES ('1250684287','koshikov.n at domain.com','Spam')) failed: columns username, mailbox are not unique (19)
Aug 19 13:29:11 dict: Error: sql dict: commit failed: 1҅�t+�]�Ћu�}��]Ð�t&


This is my expire dict config file:

connect = /var/mail/expire.db
#v1.2
map {
        pattern = shared/expire/$user/$mailbox
        table = expires
        value_field = expire_stamp

        fields {
                username = $user
                mailbox = $mailbox
        }
}

expire plugin related dovecot sections:
dict {
  expire = sqlite:/etc/dovecot/plugins/expire.conf
}
plugin {
  expire = Trash 30 Spam 20
  expire_dict = proxy::expire
}

Version of sqlite is 3.6.16, dovecot-1.2.3.

How can I solve this ? and why expire plugin is trying to use INSERT, instead of UPDATE ?


More information about the dovecot mailing list