Randall Perry wrote to Ryan Thompson:

Unless you have yet more troubles with your
configuration, I believe that's the final solution to your problem.
It's more than that -- my spamd is definitely not reading
/etc/mail/spamassasin/local.cf. By using the following command I got some
output in mail.log:

sudo /usr/local/bin/spamd -d --pidfile /var/run/spamd.pid -u spamd
--siteconfigpath=/etc/mail/spamassassin/local.cf

Randall, please see my original message. --siteconfigpath, like -C, requires a *directory*, not a filename. This is well documented.

Got this error:

Aug 29 10:46:53 xserve1 spamd[2840]: Argument "12.00file end
/etc/mail/spamassassin/local.cf" isn't numeric in addition (+) at
/Library/Perl/lib/perl5/site_perl/5.8.4/Mail/SpamAssassin/Conf.pm line 1584.

Which tells me that the 'bayes_auto_learn_threshold_spam 12' directive must
also be v3.0 only.

Actually, that isn't a 3.0-only option. It has existed since 2.50, and exists in 2.64.

Took the threshold directives out and now it's starting
properly and is showing correct 'required='.

Good. That's a useful debugging technique.

I'm guessing you simply looked up the documentation online, where you
stumbled across the SA 3.0 Conf documentation.

Well, I printed the Mail::Spamassassin::Conf doc from search.cpan.org, thinking it applied to the version I downloaded.

That'd probably get you the latest development version (3.0). If you really can not get "perldoc Mail::SpamAssassin::Conf" to work from a prompt, try http://spamassassin.apache.org/doc.html , and particularly note the version-specific links near the bottom of the page. In your case:

http://old.spamassassin.org/full/2.6x/dist/doc/

3. For configuration options that don't seem to work, run
  spamassassin --lint, preferably as the same user spamd runs as.
  Any errors or warnings reported will hopefully help you fix your
  own problem.

Good to know. Tried it before I fixed the directives in /etc/mail/spamassassin/local.cf but got no output, which I guess confirms it's not looking there by default for it's config file.

Not necessarily. However, you haven't tried another of my earlier suggestions, yet, which would do a better job of confirming where the configuration files are being read from. Use spamassassin -D. Try spamassassin -D --lint, for instance. Among other things, I saw something like the following on 2.64 on FreeBSD that I installed just for you :-)

debug: using "/usr/local/share/spamassassin" for default rules dir
debug: using "/usr/local/etc/mail/spamassassin" for site rules dir
debug: using "/staff/ryan/.spamassassin" for user state dir
debug: using "/staff/ryan/.spamassassin/user_prefs" for user prefs file

Using the local.cf file you posted (after substituting required_hits for
required_score), --lint didn't report any errors, and -D --lint didn't
report anything that looked odd to me, *and* every directive worked as
documented in successive tests. There must be something smelly in your
overall configuration.

Again... unless you really know what you're doing, run spamassassin as
the same user spamd will run as, otherwise you don't know if there are
possibly user rules which conflict with site rules, or permissions on
things like the bayes database that aren't set properly. (In your case,
I believe this user was actually called `spamd'). `su root', then `su
spamd' should do the trick.

How do I call --lint on a specific config file?

You can't. At least, not really. --lint is designed to lint the entire ruleset.

- Ryan

--
  Ryan Thompson <[EMAIL PROTECTED]>

  SaskNow Technologies - http://www.sasknow.com
  901-1st Avenue North - Saskatoon, SK - S7K 1Y4

        Tel: 306-664-3600   Fax: 306-244-7037   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America

Reply via email to