Re: SpamAssassin Installation
Posted: 2003-10-30 18:27
Wieso?Klausi01 wrote:hat sich erldigt ....
Bei mir noch nicht
Resources for System-Administrators
https://www.rootforum.org/forum/
Wieso?Klausi01 wrote:hat sich erldigt ....
busmike wrote:gib mal das auf der console ein:
perl -MCPAN -e shell
dann zeigt er ev. sowas:
o conf prerequisites_policy ask
dann das eingeben:
install Mail::SpamAssassin
dann will er auch die zusatzmodule installieren.. und das machst du dann auch
danach einegeben:
quit
und schon wars bei mir installiert.
hatte auch ewig rumgesucht. aber nix gefunden.
obwohl es direkt auf der seite steht ;-)
http://www.spamassassin.org/dist/INSTALL
danach springste dann nach /etc/mail/spamassassin
und änderst die local.cf bzw anlegen.
meine sieht so aus, und funktioniert ganz gut.. geht aber bestimmt auch besser ;-)
# This is the right place to customize your installation of SpamAssassin.
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
###########################################################################
#
#rewrite_subject 0
#report_safe 1
required_hits 6.5
rewrite_subject 0
report_header 1
use_terse_report 1
defang_mime 1
skip_rbl_checks 0
check_mx_attempts 2
check_mx_delay 5
##EOF
ich weiß jetzt nicht mehr, ob man sendmail neu starten musste.
also zur not noch mal nen:
rcsendmail reload
oder besser:
rcsendmail restart
ich hoffe dat war jetzt alles richtig.. aber kann nicht viel schiefgehen.
ich habs auch hinbekommen.
wenn du dann mails abholst, müsste sowas im mail-header zu sehen sein:
X-Spam-Status: No, hits=0.2 required=6.5
tests=HTML_50_60,HTML_FONT_COLOR_BLUE,HTML_MESSAGE,IN_REP_TO
version=2.55
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
mails die als spam identifiziert wurden, kommen mit dem subject: SPAM: abcd xyz (also das original subject, nur mit SPAM: davor)
so das wars erstmal
cu mike
HALLO ?SunFire wrote:busmike wrote:gib mal das auf der console ein:
perl -MCPAN -e shell
dann zeigt er ev. sowas:
o conf prerequisites_policy ask
dann das eingeben:
install Mail::SpamAssassin
dann will er auch die zusatzmodule installieren.. und das machst du dann auch
danach einegeben:
quit
und schon wars bei mir installiert.
hatte auch ewig rumgesucht. aber nix gefunden.
obwohl es direkt auf der seite steht ;-)
http://www.spamassassin.org/dist/INSTALL
danach springste dann nach /etc/mail/spamassassin
und änderst die local.cf bzw anlegen.
meine sieht so aus, und funktioniert ganz gut.. geht aber bestimmt auch besser ;-)
# This is the right place to customize your installation of SpamAssassin.
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
###########################################################################
#
#rewrite_subject 0
#report_safe 1
required_hits 6.5
rewrite_subject 0
report_header 1
use_terse_report 1
defang_mime 1
skip_rbl_checks 0
check_mx_attempts 2
check_mx_delay 5
##EOF
ich weiß jetzt nicht mehr, ob man sendmail neu starten musste.
also zur not noch mal nen:
rcsendmail reload
oder besser:
rcsendmail restart
ich hoffe dat war jetzt alles richtig.. aber kann nicht viel schiefgehen.
ich habs auch hinbekommen.
wenn du dann mails abholst, müsste sowas im mail-header zu sehen sein:
X-Spam-Status: No, hits=0.2 required=6.5
tests=HTML_50_60,HTML_FONT_COLOR_BLUE,HTML_MESSAGE,IN_REP_TO
version=2.55
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
mails die als spam identifiziert wurden, kommen mit dem subject: SPAM: abcd xyz (also das original subject, nur mit SPAM: davor)
so das wars erstmal
cu mike
Hallo,
habe dies hier ausgeführt:
perl -MCPAN -e shell
dann zeigt er ev. sowas:
o conf prerequisites_policy ask
dann das eingeben:
install Mail::SpamAssassin
der mist haut nicht hin, wie bitte ist der befehl um das wieder zu deinstallieren ??
danke im voraus
Gruß
Sunny
Wie? Haut nicht hin? Fehlermeldungen bitte.SunFire wrote:der mist haut nicht hin,
Code: Select all
root:/ # rcspamd startda "sitzt" wahrscheinlich der spamd, der Daemon, aber nicht das Startscript. Mit Suse kenn ich mich nicht aus, aber dürfte unter /etc/init.d/rcspamd sein. Musst Du mal schauen.sven-reichelt wrote:... /usr/bin wenn ich das noch richtig im kopf habe
Code: Select all
server:~ # spamd -d
server:~ # ps ax | grep spamd
14755 ? S 0:01 /usr/sbin/spamd -d -c -a -L
Zu finden ist das hier: http://www.sw-soft.com/de/products/confixx/docs/INSTALL AND CONFIGURE SPAMASSASSIN
NOTE: SpamAssassin 2.64 is the last version supported by Confixx.
http://old.spamassassin.org/released/Ma ... .64.tar.gz
SpamAssassin 3.0 is NOT currently supported.
The SpamAssassin software gives an ability to filter SPAM in
your customers Mailboxes when receiving mail there.
Skip the step if you do not need SpamAssassin support in Confixx.
You can use SpamAssassin RPM package from SuSE distribution:
just install 'perl-spamassassin' and 'spamassassin' packages.
To make SpamAssassin working properly with Confixx on SuSE you
will need to open /etc/sysconfig/spamd, find there a line
SPAMD_ARGS = "-d -c -a -L"
and edit it so that it becomes:
SPAMD_ARGS = "-d -x -q -L"
Here are some explanation of these flags:
-d -- run daemonized
-L -- Use local tests only (no DNS)
-x -- Do not use user preferences files (typicall mail users in
Confixx do not have home directories, so they can not have preferences
files).
-q -- use sql data base to keep user preferences.
You need to extract the file
/etc/procmailrc
from the files.tgz archive and place them at the location specified
(packed from / - directory).
Then edit /etc/postfix/main.cf file to set the following option:
mailbox_command = /usr/bin/procmail
Make sure that file /etc/mail/spamassassin/local.cf exists
and create it if no:
#~: touch /etc/mail/spamassassin/local.cf
Now SpamAssassin is configured.
Code: Select all
################### CONFIXX SPAMASSASSIN CONFIG FILE #####################
# created at Fri Jan 28 16:51:03 2005
#
# !!! Do not make any changes in this file !!!
# All your changes will be lost after the file is auto updated next time.
#
# If you want to add here any custom directive, you should include it
# to '/root/confixx/safe/spamassassin.inc' file. Its content will be automatically
# included here during the file is autoupdated.
##########################################################################
# START CUSTOM INCLUSION (see /root/confixx/safe/spamassassin.inc)
# SpamAssassin config file for version 2.5x
# generated by http://www.yrex.com/spam/spamconfig.php (version 1.01)
# How many hits before a message is considered spam.
required_hits 5.0
# Whether to change the subject of suspected spam
rewrite_subject 1
# Text to prepend to subject if rewrite_subject is used
subject_tag *****SPAM*****
# Encapsulate spam in an attachment
report_safe 1
# Use terse version of the spam report
use_terse_report 0
# Enable the Bayes system
use_bayes 1
# Enable Bayes auto-learning
auto_learn 1
# Enable or disable network checks
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1
# 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
# END OF CUSTOM INCLUSION
# START CONFIXX GENERATED SECTION
###
user_scores_dsn DBI:mysql:confixx:localhost;mysql_socket=/var/lib/mysql/mysql.sock
user_scores_sql_username confixx
user_scores_sql_password RSOMrdb
user_scores_sql_table spampref
# END OF CONFIXX GENERATED SECTION
Code: Select all
spamdCode: Select all
SPAMD_ARGS = "-d -x -q -L" macsepp wrote:So sieht meine local.cf aus.Code: Select all
################### CONFIXX SPAMASSASSIN CONFIG FILE ##################### # created at Fri Jan 28 16:51:03 2005 # # !!! Do not make any changes in this file !!! # All your changes will be lost after the file is auto updated next time. # # If you want to add here any custom directive, you should include it # to '/root/confixx/safe/spamassassin.inc' file. Its content will be automatically # included here during the file is autoupdated. ########################################################################## # START CUSTOM INCLUSION (see /root/confixx/safe/spamassassin.inc) # SpamAssassin config file for version 2.5x # generated by http://www.yrex.com/spam/spamconfig.php (version 1.01) # How many hits before a message is considered spam. required_hits 5.0 # Whether to change the subject of suspected spam rewrite_subject 1 # Text to prepend to subject if rewrite_subject is used subject_tag *****SPAM***** # Encapsulate spam in an attachment report_safe 1 # Use terse version of the spam report use_terse_report 0 # Enable the Bayes system use_bayes 1 # Enable Bayes auto-learning auto_learn 1 # Enable or disable network checks skip_rbl_checks 0 use_razor2 1 use_dcc 1 use_pyzor 1 # 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 # END OF CUSTOM INCLUSION # START CONFIXX GENERATED SECTION ### user_scores_dsn DBI:mysql:confixx:localhost;mysql_socket=/var/lib/mysql/mysql.sock user_scores_sql_username confixx user_scores_sql_password RSOMrdb user_scores_sql_table spampref # END OF CONFIXX GENERATED SECTION
In den Mail-Hearn steht nichts derartiges drin.
Deine Anleitung hat mir nur insofern weitergeholfen, indem dort wieder steht dass ich nach Konfiguration erst Spamd starten muss und danach postfix reloaden. Beides hab ich schon mehrfach probiert und funktioniert scheinbar nicht.
Wenn ich spamassassin mitstarten soll, was bringt die Zeile dann:Code: Select all
spamd -dIch hatte das so verstanden, dass wenn Spamassassin (wie auch immer) gestartet wird, er mit diesen Flags gestartet wird. Oder ist das anders?Code: Select all
SPAMD_ARGS = "-d -x -q -L"
Danke
Code: Select all
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
Code: Select all
:0fw
* < 1024000
| spamc -f
Code: Select all
Jan 24 00:20:29 p15118119 spamd[7782]: connection from localhost.localdomain [127.0.0.1] at port 36276
Jan 24 00:20:29 p15118119 spamd[7782]: info: setuid to webXpX succeeded, reading scores from SQL.
Jan 24 00:20:29 p15118119 spamd[7782]: processing message <28431129233551.K36413@.noc.ntua.gr> for webXpX:649.
Jan 24 00:20:30 p15118119 spamd[7782]: identified spam (31.9/6.0) for webXpX:649 in 1.6 seconds, 1680 bytes.
Jan 24 00:20:30 p15118119 spamd[7782]: result: Y 31 - BAYES_99,BIZ_TLD,DRUGS_ERECTILE,DRUGS_ERECTILE_OBFU,DRUGS_PAIN,DRUGS_PAI
N_EREC,FORGED_YAHOO_RCVD,RCVD_ILLEGAL_IP,SUBJECT_DRUG_GAP_VIA,SUBJECT_DRUG_GAP_VIC,URIBL_AB_SURBL,URIBL_OB_SURBL,URIBL_SBL,URI
Code: Select all
rewrite_header Subject *****SPAM*****
Code: Select all
DROPPRIVS=yes
LOGFILE=/var/log/procmail
#VERBOSE=ON
SHELL=/bin/sh
:0fw
* < 256000
| /usr/bin/spamc -f
# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
#:0:
#* ^X-Spam-Level: ***************
#/var/spool/mail/almost-certainly-spam
# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to "probably-spam".
#:0:
#* ^X-Spam-Status: Yes
#/var/spool/mail/probably-spam
# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped. This will re-add it.
:0 H
* ! ^From[ ]
* ^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw
| sed -e 's/^rom /From /'
}
Code: Select all
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
Also nehm ich doch an, dass die Konfig doch richtig ist oder?NOTE: SpamAssassin 2.64 is the last version supported by Confixx.
SpamAssassin 3.0 is NOT currently supported.
Code: Select all
9032 ? S 0:01 /usr/sbin/spamd -d -x -q -L
Code: Select all
echo "Das ist ein Test" | spamassassin
Created user preferences file: /root/.spamassassin/user_prefs
X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on
pXXXXXXXX.pureserver.info
X-Spam-Level:
X-Spam-Status: No, score=-2.0 required=99.0 tests=ALL_TRUSTED,MISSING_HEADERS,
MISSING_SUBJECT autolearn=ham version=3.0.2
Code: Select all
#! /bin/sh
# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
MASTER_BIN=/usr/bin/spamd
test -x $SPAMD_BIN || exit 5
test -x $MASTER_BIN || exit 5
. /etc/rc.status
# First reset status of this service
rc_reset
case "$1" in
start)
echo -n "Starting SpamAssassin Daemon"
## Start daemon with startproc(8). If this fails
## the echo return value is set appropriate.
if ! /sbin/checkproc $MASTER_BIN; then
# export SPAMD_ARGS="-d -x -Q -D"
# $MASTER_BIN -d -x -Q -D & > /dev/null 2>&1
$MASTER_BIN -d -x -Q -m 1 & > /dev/null 2>&1
else
rc_reset
fi
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down SpamAssassin Daemon"
## Stop daemon with killproc(8) and if this fails
## set echo the echo return value.
/sbin/killproc $MASTER_BIN
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Stop the service and if this succeeds (i.e. the
## service was running before), start it again.
## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
$0 status >/dev/null && $0 restart
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
force-reload)
## Signal the daemon to reload its config. Most daemons
## do this on signal 1 (SIGHUP).
## If it does not support it, restart.
echo -n "Reload SpamAssassin Daemon"
$0 stop && $0 start
rc_status
;;
reload)
echo -n "Reload SpamAssassin Daemon"
## Otherwise if it does not support reload:
$0 stop && $0 start
rc_status
;;
status)
echo -n "Checking for SpamAssassin Daemon: "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Status has a slightly different for the status command:
# 0 - service running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running
# NOTE: checkproc returns LSB compliant status values.
/sbin/checkproc $MASTER_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
;;
esac
rc_exit