SA Bugzilla – Bug 8126
unable to manage global WL / BL
Last modified: 2023-05-11 05:41:13 UTC
We have txrep and user preferences in a database. In local.cf, I set user_awl_sql_override_username to 0 (we use user's ids in the database) txrep_user2global_ratio is set to 5. Now, txrep itself is working and adds rows to the table both with the specific user's id and 0 as the "global" id. However, if - as root - I run this: spamassassin --add-addr-to-welcomelist=somedomain.tld,spf the username being used for the purpose of txrep is not '0'. Also, no entries whatsoever are being added to (or modified) in the txrep table using this command. To make matters worse: The spamassassin command does not (like sa-learn or spamc) allow overriding the username. spamc on the other hand cannot be used to issue for the --add-addr-to-welcomelist functionality. At the moment, this seems to me to prevent me from managing the global WL or BL. I guess I must be missing something? Does all this work as intended?
user_awl_sql_override_username is a username. It is NOT a number, unless you have users who have numbers as their usernames… Please review the documentation for its possible values and usage. Also note: SpamAssassin refuses to run as 'root' in some circumstances. If your users do not have unique UIDs, you should use an unprivileged account for managing per-user databases.
(In reply to Bill Cole from comment #1) > Also note: SpamAssassin refuses to run as 'root' in some circumstances. If > your users do not have unique UIDs, you should use an unprivileged account > for managing per-user databases. I am not sure I managed to convey what the problem is, so let me rephrase: Ignore what I said about numbers. It does not matter anyway as tried with uuids and it does not change a thing. txrep itself works. Per user-stuff works. Entries are added in the database for individual users and for the 'global' reputation. It is all virtual users anyway, there are no system users involved anywhere. The txrep table is filled exactly how I would expect and it matches the documentation just fine. As soon as I want to manage either individual or global blocklists or welcomelists, though, none of this works. I am unable to modify global welcomelists / blocklists using spamassassin --add-addr-to-welcomelist=somedomain.tld,spf Running that command will NEITHER produce error / warning output NOR modify the txrep database table in any way.
(In reply to martin from comment #0) > > To make matters worse: > The spamassassin command does not (like sa-learn or spamc) allow overriding > the username. > spamc on the other hand cannot be used to issue for the > --add-addr-to-welcomelist functionality. Looks enough reason alone to keep this bug open. I just copy pasted the -u option from sa-learn to spamassassin: Sending trunk/lib/spamassassin-run.pod Sending trunk/spamassassin.raw Transmitting file data ..done Committing transaction... Committed revision 1909738.