Page 1 of 1
Problem mit Spamassassin
Posted: 2004-02-19 09:58
by star-com
Hi
ich habe ein kleines Problem mit Spamassassin
und zwar die installation hat geklappt, aber im mail-header erscheint nichts davon, dass spamassassin die mails gecheckt hat
in /var/log/mail erscheint auch die zeile :
Code: Select all
Feb 19 09:57:15 ipx10658 spamd[32085]: server started on port 783/tcp (running version 2.63)
aber trotzdem passiert nichts
hat jemand eine idee?
thx
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:00
by chris76
Wie kommt den der SA an die Mails, was hast du da eingestellt?
Ciao Christian
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:03
by star-com
installiert hab ich es über das perscript (also install Mail::Spamassassin)
procmailrc erstellt und ausgefüllt
dann den daemon gestartet
fertig, aber passiert nix ;)
es handelt sich übrigens ums suse 8.2 mit postfix
gruss
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:05
by chris76
wie sieht denn deine Procmailrc aus?
Gibt procmail die mail wirklich tum taggen an den SA Weiter?
Welchen MTA?
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:08
by star-com
hi
also procmailrc sieht so aus :
Code: Select all
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn`t bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
:0fw
* < 256000
| /usr/bin/spamc
:0e
{
EXITCODE=$?
}
#Bitte auskommentieren,wenn man die Spam-Mails wirklich löschen will:
# :0:
# Wenn es Spam ist, Mail löschen
# * ^X-Spam-Status: Yes
# /dev/null
#EOF
was brauchst du sonst noch ?
gruss
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:08
by bierhasser
fehlt eventuell in der
/etc/postfix/main.cf folgender Eintrag:
Code: Select all
mailbox_command = /usr/bin/procmail
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:13
by star-com
nee, die zeile habe ich auch drinne
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:17
by chris76
füg mal ganz oben in die procmailrc
diese Zeilen ein
Code: Select all
### Verbose on = ausführliches Log
VERBOSE=on
LOGFILE=/var/log/procmail.log
und schau mal was er in das log schreibt.
Ciao Christian
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:20
by star-com
mal ne ganz dumme frage
muss dazu irgendwie procmail neu gestartet werden ?
wenn ja wie, weil rcprocmail existiert nicht
gruss
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:33
by chris76
rcprocmail? was willst du damit sagen?
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:35
by star-com
na im normalfall gibt es ja startup scripte auf dem system, wie z.b. ich auch für den spamd habe
bei procmail find ich nix ähnliches
wollt fragen ob die procmailrc sofort aktiv ist oder noch ein restart von procmail notwendig ist....
das logfile wird nämlich nicht erstellt
gruss
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:42
by chris76
mach mal ein
und versuche es dann nochmal
Ciao Christian
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:45
by star-com
was nochmal versuchen ?
einfach mal ne mail durch jagen ?
bin dabei
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:47
by star-com
also so passiert im log garnichts
kann es sein, dass procmail nicht ordnungsgemäß läuft ?
Re: Problem mit Spamassassin
Posted: 2004-02-19 10:54
by chris76
steht ein
in deiner main.cf ?
poste doch sonst auch mal die komplette main.cf ohne die Kommentare.
CIao Christian
Re: Problem mit Spamassassin
Posted: 2004-02-19 11:05
by star-com
hi, also die zeile fehlte hatte nur die schon oben genannte zeile drinne
aber geändert hat sich trotzdem nichts
komplette main.cf :
Code: Select all
#soft_bounce = no
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
#default_privs = nobody
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
#mydomain = domain.tld
#myorigin = $myhostname
#myorigin = $mydomain
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4
#mydestination = $myhostname, localhost.$mydomain
#mydestination = $myhostname, localhost.$mydomain $mydomain
#mydestination = $myhostname, localhost.$mydomain, $mydomain,
# mail.$mydomain, www.$mydomain, ftp.$mydomain
#
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =
#unknown_local_recipient_reject_code = 550
unknown_local_recipient_reject_code = 450
#mynetworks_style = class
#mynetworks_style = subnet
mynetworks_style = host
#mynetworks = 168.100.189.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
#relay_domains = $mydestination
#relayhost = $mydomain
#relayhost = gateway.my.domain
#relayhost = uucphost
#relayhost = [an.ip.add.ress]
#relay_recipient_maps = hash:/etc/postfix/relay_recipients
#in_flow_delay = 1s
#alias_maps = dbm:/etc/aliases
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
#alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
#recipient_delimiter = +
#home_mailbox = Mailbox
#home_mailbox = Maildir/
#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail
#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"
mailbox_command = /usr/bin/procmail
#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus
mailbox_transport = procmail
#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =
#luser_relay = $user@other.host
#luser_relay = $local@other.host
#luser_relay = admin+$local
header_checks = pcre:/etc/postfix/header_checks
body_checks = pcre:/etc/postfix/body_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
#fast_flush_domains = $relay_domains
#fast_flush_domains =
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 10
debug_peer_level = 2
#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
mailq_path = /usr/bin/mailq
setgid_group = maildrop
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
readme_directory = /usr/share/doc/packages/postfix/README_FILES
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_maps = hash:/etc/postfix/virtual, hash:/etc/postfix/confixx_virtualUsers, hash:/etc/postfix/confixx_localDomains
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = mail.foerma.com
program_directory = /usr/lib/postfix
inet_interfaces = all
masquerade_domains =
mydestination = $myhostname, localhost.$mydomain
defer_transports =
disable_dns_lookups = no
relayhost =
content_filter =
mailbox_command =
mailbox_transport =
smtpd_sender_restrictions = hash:/etc/postfix/access
#smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = yes
reject_rbl_client = sbl.spamhaus.org
reject_rbl_client = relays.ordb.org
reject_rbl_client = unconfirmed.dsbl.org
smtp_sasl_auth_enable = no
#smtpd_sasl_auth_enable = no
smtpd_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 51200000
message_size_limit = 10240000
##IPX Added###
#smtpd_sender_restrictions = permit_sasl_authenticated
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_non_fqdn_hostname, reject_unknown_recipient_domain, reject_invalid_hostname, reject_unknown_hostname, reject_unknown_sender_domain, reject_rbl_client sbl.spamhaus.org, permit_mx_backup, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
#smtpd_sasl_local_domain = $myhostname, hash:/etc/postfix/localDomains
smtpd_sasl_local_domain = ipx10658
#TLS Support
#smtpd_use_tls = yes
#smtpd_tls_auth_only = yes
#smtpd_tls_key_file = /etc/postfix/key.pem
#smtpd_tls_cert_file = /etc/postfix/cert.pem
##der folgende eintrag muss draussen bleiben
#smtpd_tls_CAfile = /etc/postfix/cacert.pem
#smtpd_tls_loglevel = 1
#smtpd_tls_received_header = yes
#smtpd_tls_session_cache_timeout = 3600s
#tls_random_source = dev:/dev/urandom
vielleicht hilft dir das jetzt was
das procmail.log ist immernoch leer
danke für deine hilfe
Re: Problem mit Spamassassin
Posted: 2004-02-19 11:13
by chris76
Du hast weiter unten in der main.cf das
Code: Select all
mailbox_command =
mailbox_transport =
stehen.
kommentier das bitte mal aus, mach ein Restart von Postfix und versuche es nochmals.
Ciao Christian
Re: Problem mit Spamassassin
Posted: 2004-02-19 11:18
by star-com
sieht schonmal im mail-log sehr gut aus
nur gibts nochn paar fehler
Code: Select all
Feb 19 11:14:31 ipx10658 postfix/master[1405]: daemon started -- version 2.0.6
Feb 19 11:14:39 ipx10658 popper[1413]: (null) at p50913360.dip.t-dialin.net (80.145.51.96): -ERR POP EOF or I/O Error [popper.c:820]
Feb 19 11:14:55 ipx10658 postfix/smtpd[1414]: connect from smtp05.web.de[217.72.192.209]
Feb 19 11:14:55 ipx10658 postfix/smtpd[1414]: 54AE51A01AD: client=smtp05.web.de[217.72.192.209]
Feb 19 11:14:55 ipx10658 postfix/cleanup[1416]: 54AE51A01AD: message-id=<40348CA4.000003.01316@star-com>
Feb 19 11:14:55 ipx10658 postfix/qmgr[1407]: 54AE51A01AD: from=<star-com@web.de>, size=3975, nrcpt=1 (queue active)
Feb 19 11:14:55 ipx10658 postfix/smtpd[1414]: disconnect from smtp05.web.de[217.72.192.209]
Feb 19 11:14:55 ipx10658 procmail[1420]: Error while writing to "/var/log/procmail.log"
Feb 19 11:14:55 ipx10658 spamd[1228]: connection from localhost [127.0.0.1] at port 35022
Feb 19 11:14:55 ipx10658 spamd[1423]: info: setuid to nobody succeeded
Feb 19 11:14:55 ipx10658 spamd[1423]: processing message <40348CA4.000003.01316@star-com> for nobody:65534.
Feb 19 11:14:56 ipx10658 spamd[1423]: clean message (2.2/6.5) for nobody:65534 in 1.4 seconds, 3907 bytes.
Feb 19 11:14:57 ipx10658 postfix/pipe[1419]: 54AE51A01AD: to=<web5p1@mail.foerma.com>, orig_to=<adrian@wandt.org>, relay=procmail, delay=1, status=deferred (temporary failure. Command output: procmail: [1420] Thu Feb 19 11:14:55 2004 procmail: Assigning "LOGFILE=/var/log/procmail.log" procmail: Opening "/var/log/procmail.log" procmail: Error while writing to "/var/log/procmail.log" procmail: Assigning "DROPPRIVS=yes" procmail: Assuming identity of the recipient, VERBOSE=off procmail: Match on "< 256000" procmail: Executing "/usr/bin/spamc" Subject: test Folder: **Requeued** 0 )
Feb 19 11:15:00 ipx10658 popper[1454]: Stats: web5p1 0 0 0 0 p50913360.dip.t-dialin.net 80.145.51.96 [pop_updt.c:296]
Feb 19 11:15:17 ipx10658 postfix/smtpd[1414]: connect from cpe-24-197-118-004.spa.sc.charter.com[24.197.118.4]
Feb 19 11:15:23 ipx10658 popper[1455]: Stats: web5p1 0 0 0 0 p50913360.dip.t-dialin.net 80.145.51.96 [pop_updt.c:296]
was ist das jetzt ?
Re: Problem mit Spamassassin
Posted: 2004-02-19 11:48
by chris76
zum einen hat er Probleme um in Das log zu schreiben.
zum anderen wenn deine Procmailrc immer noch so aussieht wie du gepostet hast, kann das auch nicht gehen. weil du übergibst die mails zwar an den spamc, aber du hast nicht festgelegt was passieren soll wenn er damit fertig ist.
schau dir dazu mal die Doku an von procmail
Ciao Christian
Re: Problem mit Spamassassin
Posted: 2004-02-19 12:11
by star-com
kannst du mir sagen, wie die conf aussehen muss
damit die mails einfach nur an spamc und dann ins eigebtliche postfach ?
gruss
Re: Problem mit Spamassassin
Posted: 2004-02-19 12:24
by chris76
Schau dir bitte mal die
an,
so sieht es auf meinem SuSE aus, damit er die spammails dem Cyrus in das Postfach des Users Spam schubst.
Code: Select all
### Verbose on = ausführliches Log
#VERBOSE=on
#LOGFILE=/var/log/procmail.log
:0fw
| /usr/bin/spamc
# Programm zum abliefern der Post an cyrus-imap
MAILDELIVERIMAP="/usr/lib/cyrus/bin/deliver -e "$1""
# Default-benutzer
MAILUSERIMAP="$USER"
#
CYRUSIMAP="$MAILDELIVERIMAP $MAILUSERIMAP"
#
#SPAMUSERIMAP="$USER -m user.$USER.spam"
SPAMUSERIMAP="spam -m user.spam"
#
SPAMIMAP="$MAILDELIVERIMAP $SPAMUSERIMAP"
#:0:
#* ^Subject:.***SPAM***
#| $SPAMIMAP
:0:
* ^X-Spam-(Status|Flag): YES
| $SPAMIMAP
:0fw
| $CYRUSIMAP
Ciao Christian
Re: Problem mit Spamassassin
Posted: 2004-02-19 12:26
by star-com
hm, nützt mir nicht viel, da wir nicht cyrus nutzen (also kein imap) sondern nur pop3
Re: Problem mit Spamassassin
Posted: 2004-02-19 12:34
by star-com
habe folgende procmailcr :
Code: Select all
:0fw
| /usr/bin/spamc
:0e
{
EXITCODE=$?
}
:0:
* ^X-Spam-Status: Yes
/var/spool/mail/web1p1
und im logfile kommt :
Code: Select all
Feb 19 12:29:05 ipx10658 postfix/qmgr[3398]: 6997E1A01AD: from=<star-com@web.de>, size=3975, nrcpt=1 (queue active)
Feb 19 12:29:05 ipx10658 postfix/smtpd[3416]: disconnect from smtp03.web.de[217.72.192.158]
Feb 19 12:29:05 ipx10658 spamd[1228]: connection from localhost [127.0.0.1] at port 35043
Feb 19 12:29:05 ipx10658 spamd[3425]: info: setuid to nobody succeeded
Feb 19 12:29:05 ipx10658 spamd[3425]: processing message <40349DFC.000008.01316@star-com> for nobody:65534.
Feb 19 12:29:06 ipx10658 spamd[3425]: clean message (2.2/6.5) for nobody:65534 in 1.3 seconds, 3907 bytes.
Feb 19 12:29:06 ipx10658 postfix/pipe[3421]: 6997E1A01AD: to=<web5p1@mail.foerma.com>, orig_to=<adrian@wandt.org>, relay=proc
mail, delay=1, status=deferred (temporary failure)
hat jemand eine idee ????