You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Mario Sergio Candian <ms...@freebsdbrasil.com.br> on 2004/10/14 20:16:18 UTC

SA 2.64

Hi guys,

i installed the SA 2.64 with qmail, vpopmail, qmail-scanner, etc... I have
one question. I have three files in /usr/local/etc/mail/spamassasin
(local.cf, br_rules.cf and relatorio_msg.cf). I need SA read the local.cf
and the others files br_rules and relatorio_msg.cf. How i can do it?

My machine is a FreeBSD 5.2.1-RELEASE. And, i run the spamd with this
options: spamd -u vpopmail -a -c -d -v -L -r /var/run/spamd.pid

My local.cf:

rewrite_subject         1
subject_tag             [SPAM]
spam_level_stars        1
always_add_report       0
#report_header          0
#defang_mime            0
skip_rbl_checks         0
required_hits           3.7

report_safe             0
#auto_report_threshold  30
#use_terse_report       0
version_tag             domain.com.br

sa-learn --spam         /var/spool/spam-box/Maildir/*/
sa-learn --ham          /var/spool/nospam-box/Maildir/*/

ok_locales              all
ok_languages            all

#auto_learn_threshold_nonspam   1
#auto_learn_threshold_spam      6
#auto_learn                     1
bayes_auto_learn                1
bayes_auto_learn_threshold_nonspam      1
bayes_auto_learn_threshold_spam         6

auto_whitelist_factor   0.5

clear_headers
add_header all Checker-Version SpamAssassin: -last, SA TEST rulesets
add_header all Status "_YESNO_, hits=_HITS_ required=_REQD_"
add_header spam Level _STARS(+)_

I comment some lines because i dont know if this work. When i run
"spamassassin --lint" i give some error msgs:

mail# spamassassin --lint
Failed to parse line in SpamAssassin configuration, skipping: sa_learn
--spam        /var/spool/spam-box/Maildir/*/
Failed to parse line in SpamAssassin configuration, skipping: sa_learn
--ham        /var/spool/nospam-box/Maildir/*/

is this option deprecated?

if i run spamassassin --lint -D i have this message:

mail# spamassassin --lint -D
debug: Score set 0 chosen.
debug: running in taint mode? yes
debug: Running in taint mode, removing unsafe env vars, and resetting PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sb
in:/usr/local/bin:/usr/local/vpopmail/bin
debug: ignore: using a test message to lint rules
debug: using "/usr/local/share/spamassassin" for default rules dir
debug: using "/usr/local/etc/mail/spamassassin" for site rules dir
debug: using "/root/.spamassassin" for user state dir
debug: using "/root/.spamassassin/user_prefs" for user prefs file
Failed to parse line in SpamAssassin configuration, skipping: sa_learn
--spam        /var/spool/spam-box/Maildir/*/
Failed to parse line in SpamAssassin configuration, skipping: sa_learn
--ham        /var/spool/nospam-box/Maildir/*/
debug: using "/root/.spamassassin" for user state dir
debug: bayes: 42110 tie-ing to DB file R/O /root/.spamassassin/bayes_toks
debug: bayes: 42110 tie-ing to DB file R/O /root/.spamassassin/bayes_seen
debug: bayes: found bayes db version 2
debug: bayes: Not available for scanning, only 1 spam(s) in Bayes DB < 200
debug: bayes: 42110 untie-ing
debug: bayes: 42110 untie-ing db_toks
debug: bayes: 42110 untie-ing db_seen
debug: Score set 1 chosen.
debug: Initialising learner
debug: using "/root/.spamassassin" for user state dir
debug: bayes: 42110 tie-ing to DB file R/O /root/.spamassassin/bayes_toks
debug: bayes: 42110 tie-ing to DB file R/O /root/.spamassassin/bayes_seen
debug: bayes: found bayes db version 2
debug: bayes: Not available for scanning, only 1 spam(s) in Bayes DB < 200
debug: bayes: 42110 untie-ing
debug: bayes: 42110 untie-ing db_toks
debug: bayes: 42110 untie-ing db_seen
debug: is Net::DNS::Resolver available? yes
debug: trying (3) kernel.org...
debug: looking up MX for 'kernel.org'
debug: MX for 'kernel.org' exists? 1
debug: MX lookup of kernel.org succeeded => Dns available (set
dns_available to
hardcode)
debug: is DNS available? 1
debug: all '*From' addrs: ignore@compiling.spamassassin.taint.org
debug: running header regexp tests; score so far=0
debug: running body-text per-line regexp tests; score so far=1.27
debug: Razor2 is available
debug: entering helper-app run mode
 Razor-Log: Computed razorhome from env: /root/.razor
 Razor-Log: No razorhome found, using all defaults
 Razor-Log: No razor-agent.conf found, using defaults.
Oct 14 15:07:51.084876 check[42110]: [ 2] [bootup] Logging initiated
LogDebugLevel=9 to stdout
Oct 14 15:07:51.085693 check[42110]: [ 5] computed razorhome=, conf=,
ident=identity
Oct 14 15:07:51.086291 check[42110]: [ 8] Client supported_engines: 4 8
Oct 14 15:07:51.087057 check[42110]: [ 8]  prep_mail done: mail 1
headers=93, mime0=1376
Oct 14 15:07:51.087750 check[42110]: [ 7] Can't read file
servers.discovery.lst, looking relatve to
Oct 14 15:07:51.088279 check[42110]: [ 5] Can't read file
/servers.discovery.lst: No such file or directory
Oct 14 15:07:51.088771 check[42110]: [ 7] Can't read file
servers.nomination.lst, looking relatve to
Oct 14 15:07:51.089263 check[42110]: [ 5] Can't read file
/servers.nomination.lst: No such file or directory
Oct 14 15:07:51.089718 check[42110]: [ 7] Can't read file
servers.catalogue.lst, looking relatve to
Oct 14 15:07:51.090168 check[42110]: [ 5] Can't read file
/servers.catalogue.lst: No such file or directory

...

debug: running meta tests; score so far=1.27
debug: is spam? score=1.27 required=3.7 tests=DATE_MISSING,NO_REAL_NAME

Sorry about the long mail, but i tell everything that happended. Any
ideas?

Any help is appreciated.

Mario Sergio


Re: SA 2.64

Posted by Matt Kettler <mk...@evi-inc.com>.
At 03:06 PM 10/14/2004, Mario Sergio Candian wrote:
>Oks,
>
>Thanks Matt. But, you tell me to run spamassassin --lint -D to make sure
>SA is using /usr/local/etc/mail/spamassassin as the "site rules"
>directory, if the SA doenst using the .cf files of this directory, how i
>can do to the SA read the .cf in this directory first? Exists some option
>that it must be passed in the command line?

Yes there is a command-line over-ride.
SA automatically searches several directories, and uses the first one it finds.

You can do one of the following:

         1) remove the directory it finds that you don't want it to use. SA 
will search along further and might find what you want.
         2) move your files to the directory SA is using
         3) force SA to use a specified config file using the 
--siteconfigpath parameter
         from man spamassassin:
                 --siteconfigpath=path             Path for site configs 
(def: /etc/mail/spamassassin)
         and from man spamd (just to show it works the same way):
                 --siteconfigpath=path              Path for site configs 
(def: /etc/mail/spamassassin)


Re: SA 2.64

Posted by Matt Kettler <mk...@evi-inc.com>.
At 01:46 PM 10/15/2004, Mario Sergio Candian wrote:
>If i send a spam mail with the string in the message body without any
>subject:
>
><snip>GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL<snip>
>
>of my account to the server with SA, will i receive an email marked SPAM?

Yes, you it should tag it. You can even include whatever subject or other 
text you want. The one you sent me fired the GTUBE test just fine and 
racked up 1000.0 points as a result. 


Re: SA 2.64

Posted by Matt Kettler <mk...@evi-inc.com>.
At 03:11 PM 10/14/2004, Mario Sergio Candian wrote:
>when i run spamassassin --lint -D, SA get these directorys:
>
>debug: using "/usr/local/share/spamassassin" for default rules dir
>debug: using "/usr/local/etc/mail/spamassassin" for site rules dir
>debug: using "/root/.spamassassin" for user state dir
>debug: using "/root/.spamassassin/user_prefs" for user prefs file

<snip>

>is SA read the .cf files in the /usr/local/share/spamassassin first?

Yes, which is definitely what you want it to do.

SA parses and handles duplication in a "last one read wins" process..

Thus /usr/local/etc/mail/spamassassin takes precedence over 
/usr/local/share/spamassassin, clobbering any duplicate settings.

First SA reads the "default" rules directory. This should contain the 
original rulefiles shipped with SA, without any modifications or additions.

Next it reads the "site" rules directory. This is where you can over-ride 
defaults, add your own rulesets, etc. You can re-declare scores, settings, 
and over-ride more-or-less whatever you want.

Last it reads the user_prefs. Where the user can over-ride a few options.



Re: SA 2.64

Posted by Mario Sergio Candian <ms...@freebsdbrasil.com.br>.
when i run spamassassin --lint -D, SA get these directorys:

debug: using "/usr/local/share/spamassassin" for default rules dir
debug: using "/usr/local/etc/mail/spamassassin" for site rules dir
debug: using "/root/.spamassassin" for user state dir
debug: using "/root/.spamassassin/user_prefs" for user prefs file
debug: using "/root/.spamassassin" for user state dir
debug: bayes: 44152 tie-ing to DB file R/O /root/.spamassassin/bayes_toks
debug: bayes: 44152 tie-ing to DB file R/O /root/.spamassassin/bayes_seen
debug: bayes: found bayes db version 2

...

debug: Current PATH is:
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin
:/usr/local/bin:/usr/local/vpopmail/bin
debug: DCC is not available: no executable dccproc found.
debug: Pyzor is not available: pyzor not found
debug: all '*To' addrs:
debug: RBL: success for 1 of 1 queries
debug: running meta tests; score so far=1.27
debug: is spam? score=1.27 required=3.7 tests=DATE_MISSING,NO_REAL_NAME

is SA read the .cf files in the /usr/local/share/spamassassin first?

Mario Sergio

On Thu, 14 Oct 2004, Matt Kettler wrote:

> At 02:16 PM 10/14/2004, Mario Sergio Candian wrote:
> >i installed the SA 2.64 with qmail, vpopmail, qmail-scanner, etc... I have
> >one question. I have three files in /usr/local/etc/mail/spamassasin
> >(local.cf, br_rules.cf and relatorio_msg.cf). I need SA read the local.cf
> >and the others files br_rules and relatorio_msg.cf. How i can do it?
>
> SA will automatically read ALL the .cf files in the site rules directory.
>
> However, you should run spamassassin --lint -D to make sure SA is using
> /usr/local/etc/mail/spamassassin as the "site rules" directory, and not
> some other location it found first.
>
> >report_safe             0
> >#auto_report_threshold  30
> >#use_terse_report       0
> >version_tag             domain.com.br
> >
> >sa-learn --spam         /var/spool/spam-box/Maildir/*/
> >sa-learn --ham          /var/spool/nospam-box/Maildir/*/
> >
> >ok_locales              all
> >ok_languages            all
>
>
> Um.. what on earth are sa-learn statements doing in your local.cf? Remove
> them, they are invalid. sa-learn is a separate program, not a configuration
> option.
>
> run spamassassin --lint and clean up any other compliants SA might have
> about the file.
>
>
>


Re: SA 2.64

Posted by Mario Sergio Candian <ms...@freebsdbrasil.com.br>.
Oks,

Thanks Matt. But, you tell me to run spamassassin --lint -D to make sure
SA is using /usr/local/etc/mail/spamassassin as the "site rules"
directory, if the SA doenst using the .cf files of this directory, how i
can do to the SA read the .cf in this directory first? Exists some option
that it must be passed in the command line?

Mario Sergio

On Thu, 14 Oct 2004, Matt Kettler wrote:

> At 02:16 PM 10/14/2004, Mario Sergio Candian wrote:
> >i installed the SA 2.64 with qmail, vpopmail, qmail-scanner, etc... I have
> >one question. I have three files in /usr/local/etc/mail/spamassasin
> >(local.cf, br_rules.cf and relatorio_msg.cf). I need SA read the local.cf
> >and the others files br_rules and relatorio_msg.cf. How i can do it?
>
> SA will automatically read ALL the .cf files in the site rules directory.
>
> However, you should run spamassassin --lint -D to make sure SA is using
> /usr/local/etc/mail/spamassassin as the "site rules" directory, and not
> some other location it found first.
>
> >report_safe             0
> >#auto_report_threshold  30
> >#use_terse_report       0
> >version_tag             domain.com.br
> >
> >sa-learn --spam         /var/spool/spam-box/Maildir/*/
> >sa-learn --ham          /var/spool/nospam-box/Maildir/*/
> >
> >ok_locales              all
> >ok_languages            all
>
>
> Um.. what on earth are sa-learn statements doing in your local.cf? Remove
> them, they are invalid. sa-learn is a separate program, not a configuration
> option.
>
> run spamassassin --lint and clean up any other compliants SA might have
> about the file.
>
>
>


Re: SA 2.64

Posted by Matt Kettler <mk...@evi-inc.com>.
At 02:16 PM 10/14/2004, Mario Sergio Candian wrote:
>i installed the SA 2.64 with qmail, vpopmail, qmail-scanner, etc... I have
>one question. I have three files in /usr/local/etc/mail/spamassasin
>(local.cf, br_rules.cf and relatorio_msg.cf). I need SA read the local.cf
>and the others files br_rules and relatorio_msg.cf. How i can do it?

SA will automatically read ALL the .cf files in the site rules directory.

However, you should run spamassassin --lint -D to make sure SA is using 
/usr/local/etc/mail/spamassassin as the "site rules" directory, and not 
some other location it found first.

>report_safe             0
>#auto_report_threshold  30
>#use_terse_report       0
>version_tag             domain.com.br
>
>sa-learn --spam         /var/spool/spam-box/Maildir/*/
>sa-learn --ham          /var/spool/nospam-box/Maildir/*/
>
>ok_locales              all
>ok_languages            all


Um.. what on earth are sa-learn statements doing in your local.cf? Remove 
them, they are invalid. sa-learn is a separate program, not a configuration 
option.

run spamassassin --lint and clean up any other compliants SA might have 
about the file.