You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Leonard Megliola <le...@megliola.com> on 2005/09/05 18:59:01 UTC

Using "-C" command-line option breaks spamd

Hi,

I've been trying to install spamassassin for a week or so now and I think I
finally have an idea of where the problem is, but not what it is and how to
fix it.

When I start spamd with the -C command-line option spamassassin will not
correctly identify the GTUBE message as spam.  But if I start spamassassin
without the -C command-line option it will correctly identify GTUBE as spam.

The odd thing about this is that aside from init.pre, everything else in my
-C directory is essentially empty.  All of the lines in local.cf and
secrets.cf are commented.

I installed Spamassassin 3.0 on Gentoo using the portage version of the
software.

The contents of init.pre are as follows:

----

# RelayCountry - add metadata for Bayes learning, marking the countries
# a message was relayed through
#
# loadplugin Mail::SpamAssassin::Plugin::RelayCountry

# URIDNSBL - look up URLs found in the message against several DNS
# blocklists.
#
loadplugin Mail::SpamAssassin::Plugin::URIDNSBL

# Hashcash - perform hashcash verification.
#
loadplugin Mail::SpamAssassin::Plugin::Hashcash

# SPF - perform SPF verification.
#
loadplugin Mail::SpamAssassin::Plugin::SPF

----

I could run spamassassin without using local.cf, but I would like to change
some of the options.  In my tests, it doesn't matter what the contents of
local.cf are.  If you use "-C" spamassassin will fail to identify mail as
spam.

To clarify what I mean by fail, I run the sample spam message through spamc
and the message comes through with a X-Spam-Checker-Version header but does
not come through with an X-Spam-Status header.

Without the "-C" option it comes through as it should.

Does anyone have experience with or insight into this problem?  

Thanks,

Leonard






Re: Using "-C" command-line option breaks spamd

Posted by Matt Kettler <mk...@comcast.net>.
At 12:59 PM 9/5/2005, Leonard Megliola wrote:

>Hi,
>
>I've been trying to install spamassassin for a week or so now and I think I
>finally have an idea of where the problem is, but not what it is and how to
>fix it.
>
>When I start spamd with the -C command-line option spamassassin will not
>correctly identify the GTUBE message as spam.  But if I start spamassassin
>without the -C command-line option it will correctly identify GTUBE as spam.

As Duncan pointed out the -C option forces a new *default* rules directory. 
Thus, pointing -C to an empty directory will cause SA to have no rules at 
all in it's configuration.

-C should generally be left alone, it's usually only useful to developers 
that have multiple images of the main ruleset, although some advanced users 
may find use of it.

I think the option you wanted was --siteconfig, but you may not want to 
even specify that.

If you really want to use something other than /etc/mail/spamassassin for 
your init.pre and local.cf use the --siteconfig command line option. 
However, if you're just going to use /etc/mail/spamassassin, don't even 
specify that.


Re: Using "-C" command-line option breaks spamd

Posted by Duncan Findlay <du...@debian.org>.
On Mon, Sep 05, 2005 at 10:59:01AM -0600, Leonard Megliola wrote:
> 
> Hi,
> 
> I've been trying to install spamassassin for a week or so now and I think I
> finally have an idea of where the problem is, but not what it is and how to
> fix it.
> 
> When I start spamd with the -C command-line option spamassassin will not
> correctly identify the GTUBE message as spam.  But if I start spamassassin
> without the -C command-line option it will correctly identify GTUBE as spam.
> 
> The odd thing about this is that aside from init.pre, everything else in my
> -C directory is essentially empty.  All of the lines in local.cf and
> secrets.cf are commented.

The -C option tells spamd what directory to read its rules and scores
from, and it replaces the defaults, it doesn't add to them. So
essentially you're telling spamd to run with essentially no rules,
which, not surprisingly, doesn't mark anything as spam.

So, either copy everything into your -C directory, from
/usr/share/spamassassin (or equivalent) and /etc/spamassassin (or
equivalent), or just edit the files in /etc/spamassassin (possibly
/etc/mail/spamassassin instead, not sure).

-- 
Duncan Findlay

Re: Using "-C" command-line option breaks spamd

Posted by jdow <jd...@earthlink.net>.
From: "Leonard Megliola" <le...@megliola.com>

>
> Hi,
>
> I've been trying to install spamassassin for a week or so now and I think 
> I
> finally have an idea of where the problem is, but not what it is and how 
> to
> fix it.
>
> When I start spamd with the -C command-line option spamassassin will not
> correctly identify the GTUBE message as spam.  But if I start spamassassin
> without the -C command-line option it will correctly identify GTUBE as 
> spam.
>
> The odd thing about this is that aside from init.pre, everything else in 
> my
> -C directory is essentially empty.  All of the lines in local.cf and
> secrets.cf are commented.
>
> I installed Spamassassin 3.0 on Gentoo using the portage version of the
> software.

...

> I could run spamassassin without using local.cf, but I would like to 
> change
> some of the options.  In my tests, it doesn't matter what the contents of
> local.cf are.  If you use "-C" spamassassin will fail to identify mail as
> spam.
>
> To clarify what I mean by fail, I run the sample spam message through 
> spamc
> and the message comes through with a X-Spam-Checker-Version header but 
> does
> not come through with an X-Spam-Status header.
>
> Without the "-C" option it comes through as it should.
>
> Does anyone have experience with or insight into this problem?
>
> Thanks,
>
> Leonard

1) What is the full file name and path following "-C " on the spamd
   command line?
2) What are the permissions of that directory and the files within it?
3) Who are you running spamd as?
4) Are there differences in the above data such as running as nobody
   but the files and directory for your configuration are root?

{^_^}