1.
### 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"
2.
# Options to spamd
SPAMDOPTIONS="-d -c -m5 -H"
3.
# SpamAssassin config file for version 3.x
# NOTE: NOT COMPATIBLE WITH VERSIONS 2.5 or 2.6
# See
http://www.yrex.com/spam/spamconfig25.php for earlier versions
# Generated by
http://www.yrex.com/spam/spamconfig.php (version 1.50)
# How many hits before a message is considered spam.
required_score 0.0
# Encapsulate spam in an attachment (0=no, 1=yes, 2=safe)
report_safe 1
rewrite_header Subject [SPAM]
# Change the subject of suspected spam
rewrite_subject 1
subject_tag *****SPAM*****
# Enable the Bayes system
use_bayes 1
# Enable Bayes auto-learning
bayes_auto_learn 1
# Enable or disable network checks
skip_rbl_checks 0
use_razor2 0
use_dcc 0
use_pyzor 0
# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_languages all
# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales all
4.
#!/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
5.
#!/bin/bash
#
# Init file for Spamassassin sendmail milter.
#
# chkconfig: - 79 21
# description: spamass-milter is a daemon that hooks into sendmail and \
# routes email messages to spamassassin
#
# processname: spamass-milter
# config: /etc/sysconfig/spamass-milter
# pidfile: /var/run/spamass-milter.pid
source /etc/rc.d/init.d/functions
source /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x /usr/sbin/spamass-milter ] || exit 1
### Default variables
SOCKET="/var/run/spamass-milter/spamass-milter.sock"
EXTRA_FLAGS="-m -r 15"
SYSCONFIG="/etc/sysconfig/spamass-milter"
### Read configuration
[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
RETVAL=0
prog="spamass-milter"
desc="SpamAssassin milter"
pidfile=/var/run/spamass-milter.pid
start() {
echo -n $"Starting $desc ($prog): "
touch $pidfile
chown sa-milt:sa-milt $pidfile
daemon --user sa-milt /usr/sbin/${prog}-wrapper -p $SOCKET -P $pidfile $EXTRA_FLAGS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/spamass-milter
return $RETVAL
}
stop() {
echo -n $"Shutting down $desc ($prog): "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $pidfile
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/spamass-milter
return $RETVAL
}
restart() {
stop
sleep 2
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condrestart)
[ -e /var/lock/subsys/spamass-milter ] && restart
RETVAL=$?
;;
status)
status $prog
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
RETVAL=1
esac
exit $RETVAL