SA Bugzilla – Bug 7029
custom query to bayes username -> id lookup
Last modified: 2014-03-31 08:16:47 UTC
Created attachment 5195 [details] Patch for proposed change which adds a config param. I'm doing a setup where I'm going to put spamassassin checks before the delivery of the mail, and at this stage the username of receiving user is not know but only the email address. The problem with this approach is that the query spamassassin uses for looking up the id in bayes_vars expects username. So I would like to make a change to the code that adds a config option where a custom query can be defined. Code for this change is attached as a patch. This would allow me to use this query for lookup: SELECT id FROM bayes_vars WHERE username = spam_user(?) Instead of the hardcoded one: SELECT id FROM bayes_vars WHERE username = ?