Hi there,
I've updated Dovecot from v2.3.14 (cee3cbc0d) to v2.3.17 (e2aa53df5b).
Right after the update, dovecot begun flooding the mail.log and
PostgreSQL's log.
My dict sql configuration:
,--[ .../dovecot/dovecot-dict-sql.conf.ext ]--
| map {
| pattern = priv/quota/storage
| table = userquota
| username_field = uid
| value_field = bytes
| }
| map {
| pattern = priv/quota/messages
| table = userquota
| username_field = uid
| value_field = messages
| }
`--
This worked for decades. Since the update dovecot is passing the user's
email address, instead the user's UID to the query. And therefor I have
lots of errors in the log files: see attached `mail.log' and
`postgresql-14-main.log' excerpts.
The `userquota' table looks like this:
Table "public.userquota"
Column | Type | Collation | Nullable | Default
----------+---------+-----------+----------+---------
uid | bigint | | not null |
bytes | bigint | | not null | 0
messages | integer | | not null | 0
...
Foreign-key constraints:
"fkey_userquota_uid_users" FOREIGN KEY (uid) REFERENCES users(uid)
ON DELETE CASCADE
(full database structure:
https://bitbucket.org/pvo/vmm/src/vmm-0.7.0/pgsql/create_tables.pgsql)
Regards,
Pascal
--
Ubuntu is an ancient African word meaning “I can’t install Debian.”
-- unknown
Dec 2 00:44:22 host dovecot: lmtp(u...@localhost.localdomain.org)<289601><wuGoMdUIqGFBawQA03CDDg>: Error: lmtp-server: conn [2001:db8::143]:38119 [1]: rcpt user+dove...@localhost.localdomain.org: quota-dict: Quota update failed: dict-server returned failure: sql dict: commit failed: ERROR: invalid input syntax for type bigint: "u...@localhost.localdomain.org"
Dec 2 00:44:22 host dovecot: lmtp: Error: LINE 1: ...bytes=bytes+12758,messages=messages+1 WHERE uid = 'user@loca...
Dec 2 00:44:22 host dovecot: lmtp: Error: ^ (reply took 0.074 secs (0.074 in dict wait, 0.000 in other ioloops, 0.000 in locks, async-id reply 0.018 secs ago, started on dict-server 0.051 secs ago, took 0.051 secs)) - Quota is now desynced
2021-12-01 23:44:22 GMT ERROR: invalid input syntax for type bigint: "u...@localhost.localdomain.org" at character 72
2021-12-01 23:44:22 GMT STATEMENT: UPDATE userquota SET bytes=bytes+12758,messages=messages+1 WHERE uid = 'u...@localhost.localdomain.org'