On Fri, Oct 08, 2004 at 08:51:46PM -0600, [EMAIL PROTECTED] wrote: > I'm having problems getting sa 3.0 to get user pref's from the mysql > database. I'm using Exim 4.43 with the latest exiscan patch compiled > into it fyi. I've entered @GLOBAL and my email address into the > database, @GLOBAL is set to 5.2 required_hits and my email address et to > 5.4. I can't seem to get the custom query correct to have it use my > pref's when an email is sent to me. > > Keeps using user 'nobody' with the 5.2 required hits, I've tested this > with sa in debug mode. I used the example on the wiki page on > spamassassins site, however once I get this working I'd like to know > how I get it to select the correct user using CONCAT as I don't know if > there are any variables you can CONCAT for the email username? There > are several domains on the server. > > the example was: > user_scores_sql_custom_query SELECT preference, value FROM _TABLE_ > WHERE username = _USERNAME_ OR username = '$GLOBAL' OR username = > CONCAT('%',_DOMAIN_) ORDER BY username ASC > > my usersnames are in [EMAIL PROTECTED] format. so in the database say I have > > [EMAIL PROTECTED] required_hits 4.0 > [EMAIL PROTECTED] required_hits 4.6 > [EMAIL PROTECTED] required_hits 7.0 > [EMAIL PROTECTED] required_hits 5.0 > and use @GLOBAL if the username isn't in the database. > > I'm not sure how I would need to set the custom query up for that. >
>From what you've said, it doesn't sound like you need a custom query, remove that line from your config file. Probably the true cause of your problems is the fact that you either aren't sending the Username to spamd or you are sending the wrong username. I'm not familar with exiscan so can't really help there. Michael