Spamassassin

De MochilaWiki
Ir para navegaçãoIr para pesquisar

instalando

apt-get install spamassassin razor pyzor libnet-dns-perl libmail-spf-query-perl


configurando

em /etc/default/spamassassin

seu conteúdo deve ficar assim

# /etc/default/spamassassin
# Duncan Findlay 

# WARNING: please read README.spamd before using.
# There may be security risks. 

# Change to one to enable spamd
ENABLED=1

# Options
# See man spamd for possible options. The -d option is automatically added.

# NOTE: version 3.0.x has switched to a "preforking" model, so you
# need to make sure --max-children is not set to anything higher than
# 5, unless you know what you're doing.

OPTIONS="--create-prefs --max-children 5 --helper-home-dir"

# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Otherwise, the init script will not be able to shut spamd down.
PIDFILE="/var/run/spamd.pid"

# Set nice level of spamd
#NICE="--nicelevel 15"

agora vamos editar o arquivo /etc/spamassassin/local.cf

o conteúdo do arquivo deve ficar assim

### checagens na rede ##############

# faz checagens RBL (0=nao, 1=sim)
skip_rbl_checks 0

# dcc (0=nao, 1=sim)
use_dcc 1
dcc_path /usr/bin/dccproc
dcc_add_header 1
dcc_dccifd_path /usr/sbin/dccifd
 
#pyzor (0=nao, 1=sim)
use_pyzor 1
pyzor_path /usr/bin/pyzor
pyzor_add_header 1

#razor (0=nao, 1=sim)
use_razor2 1
razor_config /etc/razor/razor-agent.conf
 
### encapsular spam em anexo (0=nao, 1=ok, 2=safe) ###
report_safe 0

### nivel de sensibilidade do spamassassin #######
required_score 4.0

### idiomas ######
ok_languages all
ok_locales all

### sobrescreve o subject ########
rewrite_header Subject [***** SPAM _SCORE_ *****]

### sistema bayes ##########
use_bayes 1
use_bayes_rules 1
bayes_auto_learn 1

### lista liberada ############
whitelist_from *@dominio.com.br
#unwhitelist_from proibido@dominio.com.br

### lista negada ##########################
blacklist_from *@microsoft.com *@sco.com
#unblacklist_from liberado@microsoft.com

#### redes confiaveis ############
trusted_networks 127.0.0.0/8 192.168.1.0/24 200.xx.xx.xx/29 201.xx.xx.xx/29

### adicionando headers na mensagens ########
clear_headers
add_header spam FLAG _YESNOCAPS
add_header all Status _YESNO_, hits=_HITS_ required=_REQD_ tests=_TESTS_ version=_VERSION_
add_header all Level _STARS(*)_
add_header all Checker-Version SpamAssassin _VERSION (_SUBVERSION_) on _HOSTNAME_
fold_headers 1

referências: