На просторах интернета очень много вариантов настройки борьбы со спамом. Я тоже свою борьбу затеваю. Поделимся идеями, конфигами и успехами. AltLinux Centaurus 7, свежеустановленный и обновленный, Postfix+Dovecot+Spamassassin+ClamAV
main.cf
# Global Postfix configuration file. This file lists only a small subset
# of all parameters. For the syntax, and for a complete parameter list,
# see the postconf(5) manual page. For a commented and more complete
# version of this file see /etc/postfix/main.cf.dist
mailbox_command = /usr/bin/procmail -a $DOMAIN -d $LOGNAME
inet_protocols = ipv4
#
address_verify_sender = <>
access_map_reject_code = 550
invalid_hostname_reject_code = 550
unknown_local_recipient_reject_code = 550
non_fqdn_reject_code = 550
unknown_address_reject_code = 550
unknown_client_reject_code = 550
unknown_hostname_reject_code = 550
unverified_recipient_reject_code = 550
unverified_sender_reject_code = 550
#
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
smtpd_tls_received_header = yes
smtpd_tls_key_file = /var/lib/ssl/private/postfix.key
smtpd_tls_cert_file = /var/lib/ssl/certs/postfix.cert
smtpd_sasl_auth_enable = yes
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_security_options = noanonymous, noplaintext
mynetworks = localhost, $myhostname, $config_directory/mynetworks
#
smtpd_helo_required = yes
smtpd_delay_reject = yes
smtpd_helo_restrictions = check_recipient_access cdb:/etc/postfix/whitelist, permit_mynetworks, permit_sasl_authenticated, check_helo_access cdb:/etc/postfix/helo_access, reject_invalid_helo_hostname, reject_unknown_helo_hostname, permit
smtpd_client_restrictions = check_recipient_access cdb:/etc/postfix/whitelist, permit_mynetworks, permit_sasl_authenticated, check_client_access cdb:/etc/postfix/client_access, permit
smtpd_sender_restrictions = check_recipient_access cdb:/etc/postfix/whitelist, permit_mynetworks, permit_sasl_authenticated, check_sender_access cdb:/etc/postfix/sender_access, permit
smtpd_recipient_restrictions = check_recipient_access cdb:/etc/postfix/recipient_access, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_non_fqdn_recipient, reject_invalid_hostname, permit
virtual_alias_maps = ldap:/etc/postfix/ldap-aliases.cf, ldap:/etc/postfix/ldap-users.cf
local_recipient_maps = proxy:unix:passwd.byname $alias_maps ldap:/etc/postfix/ldap-users.cf
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
mailbox_unpriv_delivery = no
relayhost =
#mailbox_size_limit=209715200
message_size_limit = 9437184
content_filter = scan:127.0.0.1:10026
receive_override_options = no_address_mappings
#
header_checks = regexp:/etc/postfix/header_checks
Spamassassin вроде ничего не менял, кроме оценки
Local.cf
# How many hits before a message is considered spam.
required_hits 4.6
#whitelist
whitelist_from localhost
#blacklist LOCALE
blacklist_from *@*.de
#blacklist DOMAIN
blacklist_from *@*jp*.com
# Text to prepend to subject of suspected spam
rewrite_header Subject [* SPAM? *]
# Encapsulate spam in an attachment (safe) or not
report_safe 1
# Disable AWL by default
ifplugin Mail::SpamAssassin::Plugin::AWL
use_auto_whitelist 0
endif
# Enable the Bayes system
use_bayes 1
bayes_path /var/spool/spamassassin/bayes
bayes_file_mode 0775
# Enable Bayes auto-learning
bayes_auto_learn 1
# Enable or disable network checks
skip_rbl_checks 0
# Uncomment when you load correspondent plugins
#use_razor2 1
#use_dcc 1
#use_pyzor 1
# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales ru
clear_report_template
report Content analysis details on host _HOSTNAME_: _HITS_ points, _REQD_ required
report _SUMMARY_
Спам приходит и довольно не мало, часть конечно отсеивается, часть пересылается на ящик для него. bayes сильно не кормил спамом еще.
Спамеры тоже не обучаются, хотелось бы узнать методы борьбы участников форума, поделитесь успехами.