You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by James Hindley <aq...@hotmail.com> on 2006/06/22 18:18:48 UTC

Two Errors With Spamassassin - Please Help

Hello All,

I am currently having 2 issues with Spamassassin. I have included the script 
as well that I am getting the errors with.  Any help would be greatly 
appreciated.  I have to fix the error with this version of Spamassassin, I 
cannot upgrade it at this time.  Please let me know if you need any more 
info and thank you in advance for your efforts.


Spamassassin version is 3.0.2.
OS is redhat ES 2.1.



Here following is the error being returned when i run:

spamassassin -D --lint

[root@mail root]# spamassassin -D --lint
Global symbol "%opt" requires explicit package name at /usr/bin/spamassassin 
line 117.

Unmatched right curly bracket at /usr/bin/spamassassin line 120, at end of 
line
syntax error at /usr/bin/spamassassin line 120, near "}"
Execution of /usr/bin/spamassassin aborted due to compilation errors.

------------------------------------------------------


also, the following are the config files for spamassassin, both these files 
are located in /etc/mail/spamassassin:

[root@mail spamassassin]# more init.pre
# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
# This file will be loaded before *all other* configuration files, including
# the system configuration.  As such, it's a good place to set things that
# will affect how those files are parsed, like which plugins are loaded
# etc.
#
###########################################################################

# 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

-----------------------------------------

[root@mail spamassassin]# more local.cf
# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
###########################################################################
#
# report_safe 1
# trusted_networks 212.17.35.
# lock_method flock

rewrite_header Subject ******SPAM******

required_score 5.0

# required_score n.nn (default: 5)
# Set the score required before a mail is considered spam. n.nn can be an
# integer or a real number. 5.0 is the default setting, and is quite 
aggressive;
# it would be suitable for a single-user setup, but if you're an ISP 
installing SpamAssassin,
# you should probably set the default to be more conservative, like 8.0 or 
10.0.
# It is not recommended to automatically delete or discard messages marked 
as spam,
# as your users will complain, but if you choose to do so, only delete 
messages with an
# exceptionally high score such as 15.0 or higher. This option was 
previously known as
# required_hits and that name is still accepted, but is deprecated.

rewrite_subject 1

# rewrite_subject (0|1|2) This setting configures how to handle
# SPAM. A setting of 0 puts the SpamAssassin report into the
# headers. A setting of 1 puts it in the main email and attaches
# the original email as an attachment. Setting 2 is similar to
# setting 1, plus it changes the type of attachment to
# text/plain (as a security measure).

report_safe 0

# report_safe { 0 | 1 | 2 } (default: 1)
# if this option is set to 1, if an incoming message is tagged as spam, 
instead of
# modifying the original message, SpamAssassin will create a new report 
message and
# attach the original message as a message/rfc822 MIME part (ensuring the 
original
# message is completely preserved, not easily opened, and easier to 
recover).
#
# If this option is set to 2, then original messages will be attached with a 
content
# type of text/plain instead of message/rfc822. This setting may be required 
for safety
# reasons on certain broken mail clients that automatically load attachments 
without any
# action by the user. This setting may also make it somewhat more difficult 
to extract
# or view the original message.
#
# If this option is set to 0, incoming spam is only modified by adding some 
X-Spam- headers
# and no changes will be made to the body. In addition, a header named 
X-Spam-Report will
# be added to spam. You can use the remove_header option to remove that 
header after
# setting report_safe to 0.

use_terse_report 0

# use_terse_report (0|1) Setting this to 0 gives the normal
# length explanation of why the message was considered SPAM.
# Setting it to 1 gives a shorter report. (Note that this report
# only appears if you change the report_safe setting, or if you
# configure blocking like we will do...in which case the sender
# gets this report).

defang_mime 0

# defang_mime { 0 | 1 }   (default: 1)
# By default, SpamAssassin will change the Content-type:
# header of suspected spam to "text/plain". This is a
# safety feature. If you prefer to leave the Content-
# type header alone, set this to 0.

use_bayes 1

# use_bayes ( 0 | 1 ) (default: 1) Whether to use the naive-Bayesian-style 
classifier
# built into SpamAssassin. This is a master on/off switch for all
# Bayes-related operations.

bayes_auto_learn 1

# bayes_auto_learn ( 0 | 1 ) (default: 1)
# Whether SpamAssassin should automatically feed high-scoring mails (or 
low-scoring mails, for non-spam)
# into its learning systems. The only learning system supported currently is 
a naive-Bayesian-style
# classifier.

bayes_auto_learn_threshold_nonspam

# bayes_auto_learn_threshold_nonspam n.nn (default: 0.1)
# The score threshold below which a mail has to score, to be fed into 
SpamAssassin's learning
# systems automatically as a non-spam message.

bayes_auto_learn_threshold_spam 8.0

# bayes_auto_learn_threshold_spam n.nn (default: 12.0)
# The score threshold above which a mail has to score, to be fed into 
SpamAssassin's learning
# systems automatically as a spam message.
#
# Note: SpamAssassin requires at least 3 points from the header, and 3 
points from the body
# to auto-learn as spam. Therefore, the minimum working value for this 
option is 6.

bayes_path /etc/mail/spamassassin/bayes

# bayes_path /path/to/file (default: ~/.spamassassin/bayes)
# Path for Bayesian probabilities databases. Several databases will be 
created, with this as
# the base, with _toks, _seen etc. appended to this filename; so the default 
setting results
# in files called ~/.spamassassin/bayes_seen, ~/.spamassassin/bayes_toks 
etc.
#
# By default, each user has their own, in their ~/.spamassassin directory 
with mode 0700/0600,
# but for system-wide SpamAssassin use, you may want to reduce disk space 
usage by sharing this
# across all users. (However it should be noted that Bayesian filtering 
appears to be more
# effective with an individual database per user.)

------------------------------------------------------------

_________________________________________________________________
Movies, Music & More! Visit Sympatico / MSN Entertainment 
http://entertainment.sympatico.msn.ca/

Re: Two Errors With Spamassassin - Please Help

Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
On 6/22/2006 12:18 PM, James Hindley wrote:

> Here following is the error being returned when i run:
> 
> spamassassin -D --lint
> 
> [root@mail root]# spamassassin -D --lint
> Global symbol "%opt" requires explicit package name at 
> /usr/bin/spamassassin line 117.
> 
> Unmatched right curly bracket at /usr/bin/spamassassin line 120, at end 
> of line
> syntax error at /usr/bin/spamassassin line 120, near "}"
> Execution of /usr/bin/spamassassin aborted due to compilation errors.

It looks like your copy of /usr/bin/spamassassin is borked.  Perhaps it 
was edited by someone for some reason?  Either replace it with a copy 
from your installation source directory or reinstall SA (using the same 
version if you must).


Daryl