Oto mój konfig exima:
primary_hostname = margoel.com.pl
smtp_banner = +OK Microsoft Exchange SMTP server version 5.0.1459.75 ready
domainlist local_domains = @:margoel.com.pl
domainlist relay_to_domains = @:
hostlist relay_from_hosts = 127.0.0.1
acl_smtp_rcpt = acl_check_rcpt
# acl_smtp_data = acl_check_content
acl_smtp_data = exiscan
#acl_smtp_auth = acl_check_auth
avr scanner = clamd:/var/lib/clamav/clamd.sock
qualify_domain = margoel.com.pl
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 5s
tls_certificate = /etc/mail/exim.crt
tls_privatekey = /etc/mail/exim.key
tls_advertise_hosts = *
#tls_verify_hosts = *
acl_smtp_mail = acl_check_mail
message_size_limit = 25M
acl_smtp_auth = acl_check_auth
received_header_text = "Received: \
${if def:sender_fullhost {from ${sender_fullhost}\n\t}\
{${if def:sender_ident {from ${sender_ident} }}\
${if def:sender_helo_name {(helo=${sender_helo_name})\n\t}}}}\
by ${primary_hostname} \
${if def:received_protocol {with ${received_protocol}}} (Margoel)\n\t\
${if def:tls_cipher {(tls_cipher ${tls_cipher}) }}\
${if def:tls_peerdn {(tls_peerdn ${tls_peerdn}) }}\
id ${message_id}\
${if def:received_for {\n\tfor <$received_for>}}"
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d
begin acl
warn message = X-MIME-Warning: Serious MIME defect detected ($demime_reason)
demime = *
deny message = Virus found / znaleziono wirusa :$malware_name
malware = *
accept
deny message = Pliki z rozszerzeniem $found_extension nie sa tutaj mile widziane
demime = com:vbs:bat:pif:scr
#accept hosts = /etc/mail/dontscan
acl_check_auth:
accept encrypted = *
deny message = STARTTLS required before AUTH
acl_check_rcpt:
accept hosts = :
deny domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]
deny domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
accept local_parts = postmaster
domains = +local_domains
require verify = sender
accept domains = +local_domains
endpass
verify = recipient
accept domains = +relay_to_domains
endpass
verify = recipient
accept hosts = +relay_from_hosts
accept authenticated = *
deny message = authentication PLAIN or LOGIN
acl_check_content:
condition = ${if >{$demime_errorlevel}{2}{1}{0}}
deny message = This message matches a blacklisted regular expression ($regex_match_string)
warn message = X-Spam-Score: $spam_score ($spam_bar)
warn message = X-Spam-Report: $spam_report
warn message = X-Spam-Flag: YES
deny message = This message scored $spam_score points. Congratulations!
condition = ${if >{$spam_score_int}{100}{1}{0}}
accept
acl_check_mail:
accept condition = ${if or { \
{eq{$authenticated_id@83.18.xx.xxx}{$sender_address}} \
{eq{$authenticated_id@margoel.com.pl}{$sender_address}} \
}{1}{0}}
deny message = Authenticated user must match sender!
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/mail/aliases}}
# user = exim
file_transport = address_file
pipe_transport = address_pipe
userforward:
driver = redirect
check_local_user
file = $home/.forward
no_verify
no_expn
check_ancestor
# allow_filter
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
localuser:
driver = accept
check_local_user
transport = local_delivery
cannot_route_message = Unknown user
begin transports
remote_smtp:
driver = smtp
local_delivery:
driver = appendfile
file = /var/spool/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
address_pipe:
driver = pipe
return_output
address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
address_reply:
driver = autoreply
begin retry
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
begin rewrite
begin authenticators
plain:
driver = plaintext
public_name = PLAIN
server_prompts = :
server_condition = ${if pwcheck{$2:$3}{1}{0}}
server_set_id = $2
login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${if pwcheck{$1:$2}{1}{0}}
server_set_id = $1