https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8369
Bug ID: 8369
Summary: Plugin::TxRep ERROR with pgsql for ambiguous character
in statement (with solution)
Product: Spamassassin
Version: 4.0.2
Hardware: All
OS: Linux
Status: NEW
Severity: blocker
Priority: P2
Component: Plugins
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: Undefined
There's an ambiguity on a PgSQL statement in file SQLBasedAddrList.pm at line
310:
ON CONFLICT (username, email, signedby, ip) DO UPDATE set msgcount = $7,
totscore = totscore + $8
which must be change into:
ON CONFLICT (username, email, signedby, ip) DO UPDATE set msgcount = $7,
totscore = txrep.totscore + $8
Without this change no record is inserted in the sql table.
Full log:
2026-02-22 00:16:34.472 UTC [786047] spamassassin@spamassassin ERROR: column
reference "totscore" is ambiguous at character 177
2026-02-22 00:16:34.472 UTC [786047] spamassassin@spamassassin STATEMENT:
INSERT INTO txrep (username,email,ip,msgcount,totscore,signedby) VALUES
($1,$2,$3,$4,$5,$6) ON CONFLICT (username, email, signedby, ip) DO UPDATE set
msgcount = $7, totscore = totscore + $8
--
You are receiving this mail because:
You are the assignee for the bug.