tttt
Зарегистрирован: 09.07.2006 Сообщения: 1
|
Добавлено: Вс Июл 09 2006 08:56 Заголовок сообщения: EXIM+SpamAssassin |
|
|
Вобщем хочеся следущее:
1. SpamAssassin определил писмо как спам. Exim положил это письмо в /home/spam/Maildir/new и выслал в ответ отправителю "Это письмо не доставленно потаму-что оно является спамом. Если вы хотите чтобы мы вас вычеркнули из чёрного списка пришлите письмо на postmaster@mycomp.ru ".
2. Все письма которые приходят на postmaster@mycomp.ru и еще пару адресов, не должны проверяться SpamAssassin -ом.
Что для этого нужно сделать ?
Вот мой конфиг exima:
Цитата: |
# $Cambridge: exim/exim-src/src/configure.default,v 1.7 2006/02/20 16:31:49 ph10 Exp $
######################################################################
# MAIN CONFIGURATION SETTINGS #
######################################################################
primary_hostname = mycomp.ru
domainlist local_domains = @
domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1 : 192.168.1.0/16
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_mime = acl_check_mime
acl_smtp_data = acl_check_content
spamd_address = 127.0.0.1 783
never_users = root
host_lookup = !192.168.1.0/16
rfc1413_hosts = *
rfc1413_query_timeout = 0s
system_filter = /etc/exim/system-filter
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d
tls_advertise_hosts = *
tls_certificate = /usr/share/ssl/certs/exim.pem
tls_privatekey = /usr/share/ssl/private/exim.pem
auth_advertise_hosts = !192.168.1.0/16
message_size_limit = 10M
######################################################################
# ACL CONFIGURATION #
# Specifies access control lists for incoming SMTP mail #
######################################################################
begin acl
acl_check_rcpt:
accept hosts = :
deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]
deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
accept local_parts = postmaster
domains = +local_domains
require verify = sender
accept hosts = +relay_from_hosts
control = submission
accept authenticated = *
control = submission
accept domains = +local_domains
endpass
verify = recipient
accept domains = +relay_to_domains
endpass
verify = recipient
deny message = relay not permitted
acl_check_mime:
warn decode = default
deny message = Blacklisted file extension detected
condition = ${if match \
{${lc:$mime_filename}} \
{\N(\.exe|\.pif|\.bat|\.scr|\.lnk|\.com)$\N} \
{1}{0}}
accept
acl_check_content:
warn message = X-Spam-Score: $spam_score ($spam_bar)
hosts = !+relay_from_hosts
spam = nobody:true
warn message = X-Spam-Report: $spam_report
hosts = !+relay_from_hosts
spam = nobody:true
deny message = This message scored $spam_score spam points. For details contact postmaster@mycomp.ru
spam = nobody:true
hosts = !+relay_from_hosts
condition = ${if >{$spam_score_int}{120}{1}{0}}
accept
######################################################################
# ROUTERS CONFIGURATION #
# Specifies how addresses are handled #
######################################################################
# THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT! #
# An address is passed to each router in turn until it is accepted. #
######################################################################
begin routers
dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
# user = exim
file_transport = address_file
pipe_transport = address_pipe
userforward:
driver = redirect
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
file = $home/.forward
# allow_filter
no_verify
no_expn
check_ancestor
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
localuser:
driver = accept
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
transport = local_delivery
cannot_route_message = Unknown user
######################################################################
# TRANSPORTS CONFIGURATION #
######################################################################
# ORDER DOES NOT MATTER #
# Only one appropriate transport is called for each delivery. #
######################################################################
begin transports
remote_smtp:
driver = smtp
local_delivery:
driver = appendfile
maildir_format = true
directory = /home/$local_part/Maildir/
delivery_date_add
envelope_to_add
return_path_add
group = mail
mode = 0660
address_pipe:
driver = pipe
return_output
address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
address_reply:
driver = autoreply
######################################################################
# RETRY CONFIGURATION #
######################################################################
begin retry
# Address or Domain Error Retries
# ----------------- ----- -------
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
######################################################################
# REWRITE CONFIGURATION #
######################################################################
begin rewrite
######################################################################
# AUTHENTICATION CONFIGURATION #
######################################################################
begin authenticators
plain:
driver = plaintext
public_name = PLAIN
server_prompts = :
server_condition = "${if saslauthd{{$2}{$3}{smtp}} {1}}"
server_set_id = $2
login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = "${if saslauthd{{$1}{$2}{smtp}} {1}}"
server_set_id = $1
|
вот конфиг SpamAssassin -а:
Цитата: |
whitelist_from *@---
whitelist_from *@---
whitelist_from *@---
whitelist_to *@---
whitelist_to *@---
whitelist_to *@---
whitelist_to ---l@---
whitelist_to *@---
whitelist_to *@---
whitelist_to ---@---
whitelist_to ---@---
blacklist_from *@msm.com
blacklist_from *@fmla.com
blacklist_from *@narod.ru
blacklist_from *@otakumail.com
blacklist_from *@yandex.ru
blacklist_from *@dublin.com
blacklist_from *@hotmail.com
blacklist_from *@mail.com
blacklist_from *@ubi.com
blacklist_from *@earthlink.net
blacklist_from *@usa.com
blacklist_from *@lovemail.co.uk
blacklist_from *@laneberry.com
blacklist_from *@singapore.net
blacklist_from *@singapore.com
blacklist_from *@singapore.org
blacklist_from *@singapore.ru
blacklist_from *@singapore.info
blacklist_from *@free.fr
blacklist_from *@*co.uk
blacklist_from *@gmail.com
required_hits 1.0
report_safe 0
use_terse_report 0
use_bayes 1
auto_learn 1
skip_rbl_checks 0
use_razor2 0
use_dcc 0
use_pyzor 0
use_auto_whitelist 1
auto_whitelist_path /etc/mail/spamassassin/auto_whitelist
bayes_path /etc/mail/spamassassin/bayes
rewrite_header Subject [SPAM]
ok_languages ru en
ok_locales ru en
|
|
|