You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by devi_sreem <de...@yahoo.com> on 2008/02/29 06:52:26 UTC
Spamassassin per user blacklisting is not working
Hi,
I have been trying to make spamassassin work aginst SQL user preferences
wothout any luck.
My local.cf contains.
user_scores_dsn
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
user_scores_sql_username username
user_scores_sql_password password
user_scores_sql_custom_query SELECT preference, value FROM _TABLE_ WHERE
username = _USERNAME_ OR username = '@GLOBAL' ORDER BY username ASC
I am running spamd with following switches
/usr/bin/spamd -q -x -u spamd -H /home/spamd -d -D -r
/var/run/spamassassin/spamd.pid
the debug message from spamd says
Feb 29 04:47:37 sreedevi spamd[4100]: debug: Conf::SQL: executing SQL:
SELECT preference, value FROM userpref WHERE username = 'qscand' OR username
= '@GLOBAL' ORDER BY username ASC
Feb 29 04:47:37 sreedevi spamd[4100]: debug: retrieving prefs for qscand
from SQL server
Here it says username='qscand' I am not sure why spamd is not transferring
the email account as the username to variable _USERNAME_
Please suggest me on this.
Sincerely,
Sreedevi.
--
View this message in context: http://www.nabble.com/Spamassassin-per-user-blacklisting-is-not-working-tp15752610p15752610.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: Spamassassin per user blacklisting is not working
Posted by Matt Kettler <mk...@verizon.net>.
Daryl C. W. O'Shea wrote:
> On 29/02/2008 1:18 AM, devi_sreem wrote:
>
>> I am running spamd. When a mail is being sent to mail account
>> postmaster@sreedevi.com it is automatically taking the user qscand, as you
>> know it the user is of qmail scanner.
>>
>
> Oh yeah, qmail scanner. Sorry, I won't touch that -- I'm not sure if
> it'll do per-user prefs or not. You may want to look for help on the
> qmail-scanner-general list or wait a few hours for someone here to help
> (or point you at that list).
>
>
Agreed, however, the important point is:
Spamd does not, and will not attempt to "figure out" what user to run as
using the email contents. It never has, and likely never will. (if
nothing else, consider that it would have to scan the headers twice to
do this, and at that it could only look at the To: header, which may not
be the true recipient.)
spamd is told what user to scan as by whatever client connects to it. If
qmail scanner is always passing qscand, then spamd will always use qscand.
The qmail-scanner FAQ claims that qmail-scanner will call spamc with the
-u parameter set to the rcpt to address, however that doesn't look like
it's happening. There's nothing in your SA config that would cause spamd
to default to the qscand user, so either the -u parameter is missing, or
it's not getting the rcpt to address passed to it. Either way, spamd is
being told to use qscand, the big question is why, and that's a question
for a qmail-scanner expert.
http://qmail-scanner.sourceforge.net/FAQ.php
-------------
*What about per-user SpamAssassin configs?*. Q-S calls spamc as "|spamc
-c -u <rcpt to>|" i.e. "username" is the recipient email address. This
means the recipient is passed to spamd - and so you can do per-user
options. Note that this only happens when there is /one/ recipient. If
you are running spamd with a SQL backend, or the "-x
--virtual-config-dir" option, then this should allow you to do per-user
SA settings. See SA documentation for how to configure spamd accordingly
Re: Spamassassin per user blacklisting is not working
Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
On 29/02/2008 1:18 AM, devi_sreem wrote:
> I am running spamd. When a mail is being sent to mail account
> postmaster@sreedevi.com it is automatically taking the user qscand, as you
> know it the user is of qmail scanner.
Oh yeah, qmail scanner. Sorry, I won't touch that -- I'm not sure if
it'll do per-user prefs or not. You may want to look for help on the
qmail-scanner-general list or wait a few hours for someone here to help
(or point you at that list).
Daryl
Re: Spamassassin per user blacklisting is not working
Posted by devi_sreem <de...@yahoo.com>.
I am running spamd. When a mail is being sent to mail account
postmaster@sreedevi.com it is automatically taking the user qscand, as you
know it the user is of qmail scanner.
I am running spamd with -u spamd
/usr/bin/spamd -q -x -u spamd -H /home/spamd -d -D
Sincerely,
Sreedevi.
--
View this message in context: http://www.nabble.com/Spamassassin-per-user-blacklisting-is-not-working-tp15752610p15752830.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: Spamassassin per user blacklisting is not working
Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
On 29/02/2008 12:52 AM, devi_sreem wrote:
> Here it says username='qscand' I am not sure why spamd is not transferring
> the email account as the username to variable _USERNAME_
Are you calling spamc with a "-u username" parameter?
Daryl