- info
- sale
info: "|/usr/bin/spamassassin -r"
mail: "|/usr/bin/spamassassin -r"
sale: "|/usr/bin/spamassassin -r"
И почта попадающая на эти адреса будет автоматически считатся спамом, и baes-овские фильтры тренированы на свежайший спам.
Личный журнал посвященный проблемам GNU/Linux и Debian GNU/Linux в частности
ее нужно было заменить на
PermitEmptyPassword yes
И вся проблема рпзрешилась самим собой. После долгих (несколько недель) мучений.
PermitEmptyPassword no
После чего сделать: cdcc "load map.txt"
# turn off ipv6
# http://www.rhyolite.com/pipermail/dcc/2005/002631.html
IPv6 off
/etc/default/spamassassin:
required_score 4.5
use_bayes 1
bayes_path /var/spool/exim4/.spamassassin/
auto_learn 1
use_dcc 1
dcc_add_header 1
use_razor2 1
dns_available yes
ok_languages ru en
ok_locales en ru
add_header spam Flag _YESNOCAPS_
add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_
add_header all Level _STARS(*)_
add_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on _HOSTNAME_
## Optional Score Increases
score BAYES_99 3.300
score BAYES_90 2.500
score BAYES_80 2.000
score DCC_CHECK 3.000
score RAZOR2_CHECK 2.000
score SUBJ_FULL_OF_8BITS 0.000
# score CHARSET_FARAWAY 0.000
# score CHARSET_FARAWAY_BODY 0.000
# score CHARSET_FARAWAY_HEADERS 0.000
score HEADER_8BITS 0.000
score MIME_EXCESSIVE_QP 0.000
Из тонкостей - запуск spamd из-под того-же пользователя что и exim, в противном случае есть какие-то проблема с доступом к spool файлам.
# /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 3 --helper-home-dir=/var/spool/exim4 -u Debian-exim -x"
# 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"
Automatically Generated by clamav-base postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-base
#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
#LocalSocket /var/run/clamav/clamd.ctl
TCPAddr 127.0.0.1
TCPSocket 3310
FixStaleSocket
#User root
User clamav
AllowSupplementaryGroups
ScanMail
ScanArchive
ArchiveMaxRecursion 5
ArchiveMaxFiles 1000
ArchiveMaxFileSize 10M
ArchiveMaxCompressionRatio 250
#StreamSaveToDisk
#StreamMaxLength 10M
ReadTimeout 180
MaxThreads 10
MaxConnectionQueueLength 15
LogFile /var/log/clamav/clamav.log
LogTime
LogFileMaxSize 0
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /var/lib/clamav
SelfCheck 3600
ScanOLE2
ScanPE
DetectBrokenExecutables
ScanHTML
ArchiveBlockMax
Если есть желание отсекать соединения к вашему SMTP серверу по IP адресам находящихся в вышеуказанных DNSBL (RBL), то нужно добавить в конфиг (глобальная секция):
# The gecos field in /etc/passwd holds not only the name. see passwd(5).
и соответственно в секцию acl-ей добавить:
.ifndef MAIN_ACL_SMTP_CONNECT
MAIN_ACL_SMTP_CONNECT = acl_smtp_connect
.endif
acl_smtp_connect = MAIN_ACL_SMTP_CONNECT
Но использование DNSBL на этапе открытия соединений - достаточно экстремально, так как в DNSBL может попать какой-нибудь достаточно большой провайдер, например mail.ru или РосТелеком (а такие случаи уже были)
acl_smtp_connect:
# Check against classic DNS "black" lists (DNSBLs) which list
# sender IP addresses
.ifdef CHECK_RCPT_IP_DNSBLS
deny
message = $sender_host_address is listed at $dnslist_domain ($dnslist_value: $dnslist_text)
log_message = $sender_host_address is listed at $dnslist_domain ($dnslist_value: $dnslist_text)
dnslists = CHECK_RCPT_IP_DNSBLS
.endif
# all others
accept
Потом в конфиг добавляем:
deny message = This message scored $spam_score spam points
spam = Debian-exim:true
condition = ${if >{$spam_score_int} {45} {1}{0} }
warn message = X-Spam-Score: $spam_score ($spam_bar)
spam = Debian-exim:true
warn message = X-Spam-Report: $spam_report
spam = Debian-exim:true
deny message = Found MIME error ($demime_reason)
demime = *
condition = ${if >{$demime_errorlevel} {2} {1}{0} }
deny message = Found blacklisted file attachment (.$found_extension)
demime = vbs:com:bat:pif:scr:prf:lnk
deny message = This message contain malware/virus ($malware_name)
malware = *
demime = *
В комментариях приведены пример того, что интеграция между spamassasin и clamd возможна и через Unix-socket
CHECK_DATA_LOCAL_ACL_FILE=CONFDIR/exiscan_data_acl.conf
#
# Add exiscan option
#
.ifdef CHECK_DATA_LOCAL_ACL_FILE
spamd_address = 127.0.0.1 783
# /var/run/spamd_socket
av_scanner = clamd:127.0.0.1 3310
# clamd:/var/run/clamav/clamd.ctl
.endif