SA-configuration / rewriting header, etc.

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

Jens
Posts: 29
Joined: Sat Feb 11, 2006 6:44 am

SA-configuration / rewriting header, etc.

Postby Jens » Sun May 07, 2006 11:45 am

If I use Spamassassin, where I can find the responsible configuration file?
Your article "ScalixReady - SpamAssassin in a Scalix Environment (126747)"
does not describe anything how to configure.

Settings in "/etc/mail/spamassassin/local.cf" (which should be the typical configuraion file) do not have any effect.

Code: Select all

required_hits 5
report_safe 1
rewrite_header subject *** SPAM ***
detailed_phrase_score 1
defang_mime 0

So please let me know
- how to rewrite the header
- make the message read (instead unread - I do not want any noticfication if spam arrives)
- assign to a specific User-Directory (e.g. Junk-E-Mail)

Thanks for any comments.

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Sun May 07, 2006 3:57 pm

Hi Jens,

Did you restart spamassassin after making those changes? You should also check your spamassassin startup config in /etc/sysconfig to see if you're pointing to a different location for your config files (see "man spamd" for details).

Thanks,
Rachel

Jens
Posts: 29
Joined: Sat Feb 11, 2006 6:44 am

Postby Jens » Mon May 08, 2006 3:17 am

Thanks for your reply.
I hope (and strong think so) I have done this.
But to be sure I have restarted the complete FC4-Linux again and await new Spam to see what happens.
But currently the mails are marked with Spam yes or no.
(X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO // autolearn=ham version=3.0.4 // X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on xxxx.com)
So I believe spamassasin itself is working.

This are the different files:

Code: Select all

/etc/sysconfig/sendmail:
========================
DAEMON=yes
QUEUE=1h

/etc/sysconfig/spamassassin:
============================
# Options to spamd
SPAMDOPTIONS="-d -c -m5 -H"

/etc/sysconfig/spamass-milter:
==============================
### Override for your different local config
#SOCKET=/var/run/spamass-milter/spamass-milter.sock

### Standard parameters for spamass-milter are:
### -P /var/run/spamass-milter.pid (PID file)
###
### Note that the -f parameter for running the milter in the background
### is not required because the milter runs in a wrapper script that
### backgrounds itself
###
### You may add another parameters here, see spamass-milter(1)
#EXTRA_FLAGS="-m -r 15"

I can't see anything about a "man spamd" line.

mephisto

Postby mephisto » Mon May 08, 2006 6:09 am

Jens wrote:I can't see anything about a "man spamd" line.
There is no such line. "man" is a tool to show manual pages. Just enter the command on your console.

Jens
Posts: 29
Joined: Sat Feb 11, 2006 6:44 am

Postby Jens » Mon May 08, 2006 11:13 am

Thanks Mephisto, it's a long way to understand Linux...
As far as I understand I can use the spamd -c parameter to change the path.
But before I would like to check out the current path, how I should do this?

The start script points to "/etc/sysconfig/spamassassin" see below.
You can see in the third message the file includes only the line SPAMDOPTIONS="-d -c -m5 -H".
Does it mean I have to change the path to the mentioned standard path (/etc/mail/spamassassin/ where is located the local.cf).
Should I change the start script (see <<<<<<???<<<) or use the spamd -c parameter?

/etc/rc.d/init.d/spamassasin

Code: Select all

#!/bin/sh
#
# spamassassin This script starts and stops the spamd daemon
#
# chkconfig: - 80 30
# processname: spamd
# description: spamd is a daemon process which uses SpamAssassin to check \
#              email messages for SPAM.  It is normally called by spamc \
#          from a MDA.

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# Set default spamd configuration.
SPAMDOPTIONS="-d -c -m5 -H"
SPAMD_PID=/var/run/spamassassin/spamd.pid

# Source spamd configuration.
if [ -f /etc/sysconfig/spamassassin ] ; then  <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ??? <<<
   . /etc/sysconfig/spamassassin
fi

[ -f /usr/bin/spamd -o -f /usr/local/bin/spamd ] || exit 0
PATH=$PATH:/usr/bin:/usr/local/bin

# By default it's all good
RETVAL=0

# See how we were called.
case "$1" in
  start)
   # Start daemon.
   echo -n "Starting spamd: "
   daemon $NICELEVEL spamd $SPAMDOPTIONS -r $SPAMD_PID
   RETVAL=$?
        echo
   if [ $RETVAL = 0 ]; then
      [ -n "$SPAMD_PID" ] && ln -s $SPAMD_PID /var/run/spamd.pid
      touch /var/lock/subsys/spamassassin
   fi
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down spamd: "
        killproc spamd
        RETVAL=$?
        echo
   if [ $RETVAL = 0 ]; then
      rm -f /var/lock/subsys/spamassassin
      rm -f /var/run/spamd.pid
   fi
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  condrestart)
       [ -e /var/lock/subsys/spamassassin ] && $0 restart
       ;;
  status)
   status spamd
   RETVAL=$?
   ;;
  *)
   echo "Usage: $0 {start|stop|restart|status|condrestart}"
   RETVAL=1
   ;;
esac

exit $RETVAL

mephisto

Postby mephisto » Mon May 08, 2006 11:25 am

Jens wrote:Thanks Mephisto, it's a long way to understand Linux...
As far as I understand I can use the spamd -c parameter to change the path.
But before I would like to check out the current path, how I should do this?
I think you are talking about "spamd -C" - parameters are case sensitive in linux. I don't exactly know what you are trying to achieve, but spamd is a deamon and as such it remains running all the time. Why would you want it to look for the config file in the current directory? What is the current directory at that point?
As for the config like you mentioned (if [ -f /etc/sysconfig/spamassassin ] ...) - it simply loads the standard runtime parameters for spamd, in my case this is:

Code: Select all

SPAMDOPTIONS="-d -m5 -x -q"

But I'm running mysql to store bayes data, so it's a somewhat different setup. Nevertheless I don't use the -C parameter and it honors my changes in /etc/mail/spamassassin/local.cf

Jens
Posts: 29
Joined: Sat Feb 11, 2006 6:44 am

Postby Jens » Mon May 08, 2006 11:57 am

and it honors my changes in /etc/mail/spamassassin/local.cf

Only this is my problem, I would like to make changes in the local.cf which would (after HUB signal) take effect (e.g. rewrite subject).
But it does not! :-(
And so I have to find out the reason.


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 9 guests