amavis-new y spamassassin

"Nelson Nuñez B." grupolinux en unab.cl
Mie Mayo 12 21:03:04 CLT 2004


Hola listeros, bueno mi pregunta es referente al funcionamiento de amavis 
con spamassassin.
Resulta que tengo funcionando sin ningún problema el clamav con el postfix 
y amavis, pero el funcionamiento de amavis con
spamassassin no es el optimo y lógico, digo esto porque he hecho pruebas 
con los mismo archivos de ejemplo de spamassassin "sample-spam.txt"
bajo shell "spamassassin -t < sample-spam.txt" y  me arroja el mensaje y el 
flags acusando que es un SPAM por la puntuación 6.9 (demostrando un 
funcionamiento bueno). Ahora bien al  testear con mail creado a partir de 
mismo archivo sample-spam.txt desde una cuenta externa a una cuenta mail de 
mi dominio, y el amavis junto con el spamassassin no hacen mas que 
otorgarle una puntuación de  3.8 pasando sin problemas el spam.

Adjunto mis configuraciones.

amavis.conf

# SpamAssassin settings

# $sa_local_tests_only is passed to Mail::SpamAssassin::new as a value
# of the option local_tests_only. See Mail::SpamAssassin man page.
# If set to 1, SA tests are restricted to local tests only, i.e. no tests
# that require internet access will be performed.
#
$sa_local_tests_only = 1;   # (default: false)
#$sa_auto_whitelist = 1;    # turn on AWL (default: false)

$sa_timeout = 30;           # timeout in seconds for a call to SpamAssassin
                             # (default is 30 seconds, undef disables it)
#$sa_mail_body_size_limit = 150*1024; # don't waste time on SA if mail is 
larger
                             # (less than 1% of spam is > 64k)
                             # default: undef, no limitations

# default values, can be overridden by more specific lookups, e.g. SQL
#$sa_tag_level_deflt  = 3.0; # add spam info headers if at, or above that level
$sa_tag_level_deflt = 4;
$sa_tag2_level_deflt = 6.3; # add 'spam detected' headers at that level
#$sa_kill_level_deflt = 6.9;
$sa_kill_level_deflt = $sa_tag2_level_deflt; # triggers spam evasive actions
                             # at or above that level: bounce/reject/drop,
                             # quarantine, and adding mail address extension

$sa_dsn_cutoff_level = 10;  # spam level beyond which a DSN is no
                            # effectively turning D_BOUNCE into D_DISCARD;
                             # undef disables this feature and is a default;

#
# The $sa_tag_level_deflt, $sa_tag2_level_deflt and $sa_kill_level_deflt
# may also be hashrefs to hash lookup tables, to make static per-recipient
# settings possible without having to resort to SQL or LDAP lookups.

# a quick reference:
#   tag_level  controls adding the X-Spam-Status and X-Spam-Level headers,
#   tag2_level controls adding 'X-Spam-Flag: YES', and editing Subject,
#   kill_level controls 'evasive actions' (reject, quarantine, extensions);
# it only makes sense to maintain the relationship:
#tag_level <= tag2_level <= kill_level < $sa_dsn_cutoff_level

# string to prepend to Subject header field when message exceeds tag2 level
#$sa_spam_subject_tag = '***SPAM*** ';  # (defaults to undef, disabled)
                              # (only seen when spam is not to be rejected
                              # and recipient is in local_domains*)

#$sa_spam_modifies_subj = 1; # may be a ref to a lookup table, default is true
#
# The $sa_tag_level_deflt, $sa_tag2_level_deflt and $sa_kill_level_deflt
# may also be hashrefs to hash lookup tables, to make static per-recipient
# settings possible without having to resort to SQL or LDAP lookups.

# a quick reference:
#   tag_level  controls adding the X-Spam-Status and X-Spam-Level headers,
#   tag2_level controls adding 'X-Spam-Flag: YES', and editing Subject,
#   kill_level controls 'evasive actions' (reject, quarantine, extensions);
# it only makes sense to maintain the relationship:
#tag_level <= tag2_level <= kill_level < $sa_dsn_cutoff_level

# string to prepend to Subject header field when message exceeds tag2 level
#$sa_spam_subject_tag = '***SPAM*** ';  # (defaults to undef, disabled)
                              # (only seen when spam is not to be rejected
                              # and recipient is in local_domains*)

#$sa_spam_modifies_subj = 1; # may be a ref to a lookup table, default is true

# Example: modify Subject for all local recipients except user en example.com
#$sa_spam_modifies_subj = [qw( !user en example.com . )];

/etc/mail/spamassassin/local.cf

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

# 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         1
use_razor2              0
use_dcc                 0
use_pyzor               0

# 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


Carga de amavis.

May 12 08:54:45 correo amavis[5590]: starting.  amavisd at correo.aiep.cl 
amavisd-new-20030616-p9, Unicode aware, LANG=en_US.UTF-8
May 12 08:54:45 correo amavis[5590]: Perl version               5.008
May 12 08:54:45 correo amavis[5590]: Module Amavis::Conf        1.15
May 12 08:54:45 correo amavis[5590]: Module Archive::Tar        1.08
May 12 08:54:45 correo amavis[5590]: Module Archive::Zip        1.09
May 12 08:54:45 correo amavis[5590]: Module Compress::Zlib      1.33
May 12 08:54:45 correo amavis[5590]: Module Convert::TNEF       0.17
May 12 08:54:45 correo amavis[5590]: Module Convert::UUlib      1.01
May 12 08:54:45 correo amavis[5590]: Module DB_File             1.806
May 12 08:54:45 correo amavis[5590]: Module MIME::Entity        5.404
May 12 08:54:45 correo amavis[5590]: Module MIME::Parser        5.406
May 12 08:54:45 correo amavis[5590]: Module MIME::Tools         5.411
May 12 08:54:45 correo amavis[5590]: Module Mail::Header        1.60
May 12 08:54:45 correo amavis[5590]: Module Mail::Internet      1.60
May 12 08:54:45 correo amavis[5590]: Module Mail::SpamAssassin  2.55
May 12 08:54:45 correo amavis[5590]: Module Net::Cmd            2.21
May 12 08:54:45 correo amavis[5590]: Module Net::DNS            0.31
May 12 08:54:45 correo amavis[5590]: Module Net::SMTP           2.24
May 12 08:54:45 correo amavis[5590]: Module Net::Server         0.86
May 12 08:54:45 correo amavis[5590]: Module Time::HiRes         1.38
May 12 08:54:45 correo amavis[5590]: Module Unix::Syslog        0.100
May 12 08:54:45 correo amavis[5590]: Found myself: /usr/sbin/amavisd -c 
/etc/amavisd.conf
May 12 08:54:45 correo amavis[5590]: Lookup::SQL code       NOT loaded
May 12 08:54:45 correo amavis[5590]: Lookup::LDAP code      NOT loaded
May 12 08:54:45 correo amavis[5590]: AMCL-in protocol code  loaded
May 12 08:54:45 correo amavis[5590]: SMTP-in protocol code  loaded
May 12 08:54:45 correo amavis[5590]: ANTI-VIRUS code        loaded
May 12 08:54:45 correo amavis[5590]: ANTI-SPAM  code        loaded
May 12 08:54:45 correo amavis[5618]: Net::Server: Process Backgrounded
May 12 08:54:45 correo amavis[5618]: Net::Server: 2004/05/12-08:54:45 
Amavis (type Net::Server::PreForkSimple) starting! pid(5618)
May 12 08:54:45 correo amavis[5618]: Net::Server: Binding to UNIX socket 
file /var/spool/amavis/amavisd.sock using SOCK_STREAM
May 12 08:54:45 correo amavis[5618]: Net::Server: Binding to TCP port 10024 
on host 127.0.0.1
May 12 08:54:45 correo amavis[5618]: Found $file       at /usr/bin/file
May 12 08:54:45 correo amavis[5618]: Found $arc        at /usr/bin/nomarch
May 12 08:54:45 correo amavis[5618]: Found $gzip       at /usr/bin/gzip
May 12 08:54:45 correo amavis[5618]: Found $bzip2      at /usr/bin/bzip2
May 12 08:54:45 correo amavis[5618]: Found $lzop       at /usr/bin/lzop
May 12 08:54:45 correo amavis[5618]: Found $lha        at /usr/bin/lha
May 12 08:54:45 correo amavis[5618]: Found $unarj      at /usr/bin/unarj
May 12 08:54:45 correo amavis[5618]: Found $uncompress at /usr/bin/uncompress
May 12 08:54:45 correo amavis[5618]: Found $unfreeze   at /usr/bin/unfreeze
May 12 08:54:45 correo amavis[5618]: Found $unrar      at /usr/bin/unrar
May 12 08:54:45 correo amavis[5618]: Found $zoo        at /usr/bin/zoo
May 12 08:54:45 correo amavis[5618]: Found $cpio       at /bin/cpio
May 12 08:54:45 correo amavis[5618]: Found secondary av scanner Clam 
Antivirus - clamscan at /usr/bin/clamscan
May 12 08:54:45 correo amavis[5618]: SpamControl: initializing 
Mail::SpamAssassin
May 12 08:54:46 correo amavis[5618]: SpamControl: done





Esperando algun comentario u experencia, muchas gracias.

Nelson.




Más información sobre la lista de distribución Linux