Olá pessoal,

Inicialmente quero desejar um "FELIZ NATAL"  a todos.

Bom, agora vamos ao meu problema, há alguns dias tive a nescessidade de 
implementar o spamassassin no meu servidor de email que já rodava o 
Sendmail, minha intenção era fazer o spamassassin marcar as mensagens 
como spam e usar o procmail para movê-las para uma pasta, abaixo segue 
os arquivos de configuração.

Vamos lá, primeiro o local.cf


# Add *****SPAM***** to the Subject header of spam e-mails
#
rewrite_header Subject *****SPAM*****


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

# 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
required_hits 4.0

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


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

# Encapsulate spam in an attachment
report_safe 1

# Whether to change the subject of suspected spam
# Whether to change the subject of suspected spam
rewrite_subject 1

# 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
# 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

# Enable or disable network checks
skip_rbl_checks 1
use_razor2 1
use_dcc 1
use_pyzor 1

# Use terse version of the spam report
use_terse_report


Agora o procmailrc

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

# 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: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
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
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
* ^^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "

:0 fhw
| sed -e '1s/^/F/'

:0:
*^Subject:.\*\*\*\*\*SPAM\*\*\*\*\*
/var/mail/spam/email-spam


Estou chamando o spamassassin com os eguinte comando:

spamd -c -d --nouser-config -u mail

Vou colocar o cabeçalho de uma mensagen que ja esta na lista de 
treinamento do spamassassin como sendo spam, isso sendo feito com o 
comando abaixo:

[EMAIL PROTECTED]:/var/mail/spam/treinamento# su - mail -c "sa-learn --mbox 
--spam "/var/mail/spam/treinamento""
Learned tokens from 2459 message(s) (2592 message(s) examined)

Agora o cabeçalho da mensagem após o treinamento:

 From - Mon Dec 18 12:47:52 2006
X-Account-Key: account2
X-UIDL: f1b9e14ba107facd
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <[EMAIL PROTECTED]>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on
bn1.meudominio.com.br
X-Spam-Level: *
X-Spam-Status: No, score=1.6 required=4.0 tests=DATE_IN_PAST_96_XX
autolearn=no version=3.1.7
Received: from kaczor-bhgl1lqh (esu187.neoplus.adsl.tpnet.pl 
[83.20.140.187])
by bn1.meudominio.com.br (8.12.11/8.12.11) with ESMTP id kBFH7Nwt005547;
Fri, 15 Dec 2006 15:07:43 -0200
Received: from 192.18.98.31 (HELO mx3.sun.com)
by meudominio.com.br with esmtp (6*:5LCT,K <<).)
id )43=Q1-R5TQ/I-43
for [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>; Fri, 15 
Dec 2000 18:06:46 -0060
From: "Valarie Ballard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: RE:Report
Date: Fri, 15 Dec 2000 18:06:46 -0060
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
Thread-Index: Aca6Q,0/*)3./IX*1Q([EMAIL PROTECTED]


Veja que o score esta muito baixo, uma vez que esta mensagem ja foi 
informada para o spamassassin como sendo spam... Sera que deu para voces 
entender o meu problema? Ou seja, o spamassassin esta marcando as 
mensagens com valores muito baixos, por isso não aparece nada no 
diretorio de spam. Gostaria muito de obter a ajuda de voces na solucao 
deste problema..


Desde já agradeço a todos que lerem este email.

Abraços.


-------------------------
Histórico: http://www.fug.com.br/historico/html/freebsd/
Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd

Responder a