[Dovecot] expire plugin with pgsql not working
Hi!
I've configured dovecot, and created the db/table/trigger according to http://wiki.dovecot.org/Quota/Dict. I'm using dovecot-1.1.7 and pgsql. When moving a message inside the "monitored" directory, the expires table won't get updated because of an error:
statement: INSERT INTO expires (expire_stamp, mailbox) VALUES ('1229993423', 'leva/spamassassin.SPAM') INSERT ERROR: null value in column "username" violates not-null constraint
Wonder why doesn't dovecot pass the username too. What could be the problem?
Daniel
-- LEVAI Daniel PGP key ID = 0x4AC0A4B1 Key fingerprint = D037 03B9 C12D D338 4412 2D83 1373 917A 4AC0 A4B1
On Dec 22, 2008, at 3:10 AM, LÉVAI Dániel wrote:
I've configured dovecot, and created the db/table/trigger according to http://wiki.dovecot.org/Quota/Dict.
Look into http://wiki.dovecot.org/Plugins/Expire instead. Although I
just had to fix that page too.
statement: INSERT INTO expires (expire_stamp, mailbox) VALUES ('1229993423', 'leva/spamassassin.SPAM') INSERT ERROR: null value in column "username" violates not-null constraint
Wonder why doesn't dovecot pass the username too. What could be the problem?
It doesn't need to have a username field. Leave it out of the primary
key (and remove the entire field).
Timo Sirainen wrote:
On Dec 22, 2008, at 3:10 AM, LÉVAI Dániel wrote:
I've configured dovecot, and created the db/table/trigger according to http://wiki.dovecot.org/Quota/Dict.
Look into http://wiki.dovecot.org/Plugins/Expire instead. Although I just had to fix that page too. Yes, I meant that page sorry. It was a problem with the username column in the table maybe?
It doesn't need to have a username field. Leave it out of the primary key (and remove the entire field).
Daniel
-- LEVAI Daniel PGP key ID = 0x4AC0A4B1 Key fingerprint = D037 03B9 C12D D338 4412 2D83 1373 917A 4AC0 A4B1
Timo Sirainen wrote:
On Dec 22, 2008, at 3:10 AM, LÉVAI Dániel wrote:
I've configured dovecot, and created the db/table/trigger according to http://wiki.dovecot.org/Quota/Dict.
Look into http://wiki.dovecot.org/Plugins/Expire instead. Although I just had to fix that page too.
Right, now I see. You've removed the username column from the CREATE TABLE statement. But why did you only remove it from the "v1.1 only" section? v1.2+ needs it? Also, from the "dovecot-dict-expire.conf: " section, where there is an example config, the username field is still there, and under the "PostgreSQL Backend" section the trigger still has the username in the IF test and the UPDATE's expression. Do you think these should be edited as well?
Daniel
-- LEVAI Daniel PGP key ID = 0x4AC0A4B1 Key fingerprint = D037 03B9 C12D D338 4412 2D83 1373 917A 4AC0 A4B1
On Tue, 2008-12-23 at 07:43 +0100, LÉVAI Dániel wrote:
Timo Sirainen wrote:
On Dec 22, 2008, at 3:10 AM, LÉVAI Dániel wrote:
I've configured dovecot, and created the db/table/trigger according to http://wiki.dovecot.org/Quota/Dict.
Look into http://wiki.dovecot.org/Plugins/Expire instead. Although I just had to fix that page too.
Right, now I see. You've removed the username column from the CREATE TABLE statement. But why did you only remove it from the "v1.1 only" section? v1.2+ needs it?
Yes. v1.2 configuration is different.
Also, from the "dovecot-dict-expire.conf: " section, where there is an example config, the username field is still there,
I changed that a day or two ago.
and under the "PostgreSQL Backend" section the trigger still has the username in the IF test and the UPDATE's expression. Do you think these should be edited as well?
Updated.
participants (2)
-
LÉVAI Dániel
-
Timo Sirainen