Problemy z usuwaniem spamu

Konfiguracja serwerów, usług, itp.
thid
Posty: 6
Rejestracja: 28 września 2006, 21:22

Problemy z usuwaniem spamu

Post autor: thid »

Witam
Postawiłem serwer poczty i ustawilem by spamassassin zmianial temat podejrzanych wiadomosci ze sa spamem. W procmailrc ustawilem by spam z odpowiednia iloscia gwiazdek byl kasowany niestety spam nie jest usuwany. Czy moze mi ktos z tym pomoc?


Moja konfiguracja
spamassassin local.cf

Kod: Zaznacz cały

required_hits           5.0
rewrite_header Subject *****UWAGA MOZLIWY SPAM*****
add_header all Level _STARS(X)_
rewrite_subject 1
subject_tag Spam [_HITS_] 


#   Save spam messages as a message/rfc822 MIME attachment instead of
#   modifying the original message (0: off, 2: use text/plain instead)
#
report_safe 0


#   Set which networks or hosts are considered 'trusted' by your mail
#   server (i.e. not spammers)
#
# trusted_networks 212.17.35.


#   Set file-locking method (flock is not safe over NFS, but is faster)
#
# lock_method flock


#   Set the threshold at which a message is considered spam (default: 5.0)
#
required_score 5.0


#   Use Bayesian classifier (default: 1)
#
use_bayes 1


#   Bayesian classifier auto-learning (default: 1)
bayes_auto_learn 1

bayes_auto_expire 0
#   Set headers which may provide inappropriate cues to the Bayesian
#   classifier
#
# bayes_ignore_header X-Bogosity
# bayes_ignore_header X-Spam-Flag
# bayes_ignore_header X-Spam-Status

allow_user_rules 0

#skip_rbl_check 0
ok_locales all

use_pyzor 0
use_razor2 0
#razor_config /etc/mail/spamassassin/.razor/razor-agent.conf
postfix main.cf

Kod: Zaznacz cały

myorigin = mojadomena.pl

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

myhostname = mojadomena.pl
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = mojadomena.pl, localhost.ovh.net, localhost
relayhost = 
mynetworks = 127.0.0.0/8 
mailbox_command = procmail -f -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
message_size_limit = 9150000000

smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination

sender_canonical_maps = hash:/etc/postfix/sender_canonical_maps
virtual_mailbox_domains = mojadomena.pl
virtual_mailbox_base = /home/mail
virtual_mailbox_maps = hash:/etc/postfix/virtual_mailbox_maps
virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps
virtual_uid_maps = static:404
virtual_gid_maps = static:400
virtual_mailbox_limit = 840000000000

smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
#smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:60000

# Uwierzytelnianie SASL
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes

# Dovecot SASL configuration for the Postfix SMTP server
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

content_filter=procmail
postfix master.cf

Kod: Zaznacz cały

spamassassin unix - n n - - pipe
 user=filter argv=/usr/local/bin/sa-filter -f ${sender} -- ${recipient} 
smtp      inet  n       -       n       -       -       smtpd
 -o content_filter=spamassassin:

#submission inet n       -       -       -       -       smtpd
#  -o smtpd_enforce_tls=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

smtps     inet  n       -       -       -       -       smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
 -o content_filter=spamassassin:
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
	-o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache	  unix	-	-	-	-	1	scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix	-	n	n	-	2	pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}
procmailrc

Kod: Zaznacz cały

MAILDIR=/home/mail
LOGFILE=/etc/procmail.log

DROPPRIVS=yes


:0fw: spamassassin.lock
* < 256000
| spamassassin


:0
* ^X-Spam-Level: \*\*\*
/dev/null
sa-filter

Kod: Zaznacz cały

#!/bin/bash
/usr/bin/spamassassin | /usr/sbin/sendmail -i "$@"
exit $?
jaSS
Beginner
Posty: 388
Rejestracja: 02 czerwca 2006, 08:57

Post autor: jaSS »

Podstawowe pytanie to czy spamassassin nie oznacza czy procmail nie usuwa.

Masz te gwiazdki w nagłówkach?
thid
Posty: 6
Rejestracja: 28 września 2006, 21:22

Post autor: thid »

spamassassin oznacza spam gwiazdkami bo przychodzi na skrzynki spam z zmienionym odpowiednio temat, problem raczej lezy po stronie procmaila
jaSS
Beginner
Posty: 388
Rejestracja: 02 czerwca 2006, 08:57

Post autor: jaSS »

temat nie jest równoznaczne z gwiazdkami w nagłówku, sprawdź nagłówek.

a procmail w ogóle działa?

w logu masz cokolwiek?

ja u siebie mam ustawionego procmaila:

.forward:

Kod: Zaznacz cały

"|/usr/bin/procmail"
.procmailrc:

Kod: Zaznacz cały

:0
*X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
/dev/null

#oddzoelamy spam
:0
*X-Spam-Level: \*\*\*\*\*\*
/home/jasiu/Mail/spam6

#prawdopodobnie spam
:0
*X-Spam-Level: \*\*\*\*
/home/jasiu/Mail/spam4

thid
Posty: 6
Rejestracja: 28 września 2006, 21:22

Post autor: thid »

zle sie okreslilem sprawdzilem nawet przed chwilka zrodla e-maili ze spamem i normalnie przydziela X-Spam-Level
procmail dziala, a logi puste od procmail
jaSS
Beginner
Posty: 388
Rejestracja: 02 czerwca 2006, 08:57

Post autor: jaSS »

Może skasuje spacje pomiędzy * a ^X-Spam-Level
thid
Posty: 6
Rejestracja: 28 września 2006, 21:22

Post autor: thid »

dalej spam dochodzi na skrzynki (skopiowalem twoj wpis i odpowiednio zmienilem katalogi)
jaSS
Beginner
Posty: 388
Rejestracja: 02 czerwca 2006, 08:57

Post autor: jaSS »

hmmm skoro twierdzisz ze procmail działa to nie mam pomysłu czemu miałoby to nie zadziałać

spróbuj na początku procmailrc zrobić wpis np żeby kopiował gdzieś wszystkie e-maile lub coś takiego i zobacz czy działa
thid
Posty: 6
Rejestracja: 28 września 2006, 21:22

Post autor: thid »

hmm..wlasnie zlookalesm ps aux i nie znalazlem procmaila by dzialal -_- odpale go i zobacze czy dalej cos bedzie
jaSS
Beginner
Posty: 388
Rejestracja: 02 czerwca 2006, 08:57

Post autor: jaSS »

ale procmail przecież nie chodzi stale

on jest odpalany jak przychodzi e-mail

Kod: Zaznacz cały

"|/usr/bin/procmail"
zobacz czy masz plik .forward
ODPOWIEDZ