On Tue, 2014-11-11 at 15:11 +0100, Axb wrote:
> You need to add "-D dns" (without the quotes) option to the spamassassin 
> init script
> 
> (depending on your distro it may be /etc/init.d/spamassassin)
>
On current Fedora Linux systems /etc/sysconfig/spamassassin contains a
single line:

SPAMDOPTIONS="-c -m5 -H"

Who reads it depends on how your system starts daemons:

- some daemons are still managed by a script in /etc/init.d
  In these cases the script sets its shell variables by using the
  '.' or 'source' command to override the default options, which are
  hard coded in the daemon management script, by reading the
  appropriate file from /etc/sysconfig. 

  If you simply edit SPAMDOPTIONS in /etc/init.d/spamassassin and there
  a copy of /etc/sysconfig/spamassassin exists, your change will not be
  acted on because you edited the defaults and these got overwritten
  when the script read in /etc/sysconfig/spamassassin before it started
  SA.

  In Fedora 18 SA is managed this way, so editing 
  /etc/sysconfig/spamassasin is the best way to do it for Linuxes that
  use sysVinit daemon management.

- daemons that are directly managed as a systemd service are a little
  different. 

  In Fedora 20 SA is now managed as a systemd service. The service
  definition for SA is /usr/lib/systemd/spamassassin.service, which
  declares the SA EnvironmentFile to be /etc/sysconfig/spamassassin,
  so the way to change the SA options is still by editing
  /etc/sysconfig/spamassassin

I'd imagine most Linuxes use a similar set-up, regardless of whether
they manage their daemons via systemd or the sysVinit system that Linux
originally inherited from Unix.

Start by seeing if your setup has a copy of /etc/sysconfig/spamassassin.
If so, edit that. Otherwise 'locate' is your friend. Its a lot faster
that running 'find . -name spamassassin' from the root directory!


HTH
Martin



Reply via email to