rendered paste body#
# exim.conf8:10 mail ntp
#
##############################################################################
# MAIN #####################################################
# NETWORK ####################
local_interfaces = <; 127.0.0.1 ; \
::1 ; \
somenumber.132 ; \
somenumber.132.2525
# DOMAINS ####################
primary_hostname = mail.domainhidden.com
domainlist local_domains = @ : domainhidden.com : domain2hidden.com
domainlist relay_to_domains =
hostlist relay_from_hosts = <; 127.0.0.1 ; \
::1 ; \
somenumber.160/27
# SCANNERS ###################
# av_scanner = sophie:/var/run/sophie
# spamd_address = 127.0.0.1 783
# QUALIFICATION ##############
qualify_domain = domainhidden.com
# qualify_recipient =
# allow_domain_literals
# sender_unqualified_hosts =
# recipient_unqualified_hosts =
# SECURITY ###################
never_users = root
host_lookup = *
# rfc1413_hosts = *
# rfc1413_query_timeout = 30s
# percent_hack_domains =
tls_certificate = /etc/exim/exim.crt
tls_privatekey = /etc/exim/exim.key
# TIMEOUTS ###################
ignore_bounce_errors_after = 3d
timeout_frozen_after = 7d
# ACLS #####################################################
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_mime = acl_check_mime
#acl_smtp_data = acl_check_content
begin acl
# ACL_CHECK_RCPT #############
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
# deny message = rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
# dnslists = black.list.example
# warn message = X-Warning: $sender_host_address is in a black list at $dnslist_domain
# log_message = found in $dnslist_domain
# dnslists = black.list.example
accept domains = +local_domains
endpass
verify = recipient
accept domains = +relay_to_domains
endpass
verify = recipient
accept hosts = +relay_from_hosts
accept authenticated = *
deny message = relay not permitted
# ACL_CHECK_MIME #############
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}}
deny message = Sorry, noone speaks chinese here
condition = ${if eq{$mime_charset}{gb2312}{1}{0}}
accept
# ACL_CHECK_CONTENT ##########
acl_check_content:
deny message = This message contains malware ($malware_name)
malware = *
warn message = X-Spam-Score: $spam_score ($spam_bar)
spam = nobody:true
warn message = X-Spam-Report: $spam_report
spam = nobody:true
warn message = X-Spam-Flag: YES
spam = nobody
deny message = This message scored $spam_score points. Congratulations!
spam = nobody:true
condition = ${if >{$spam_score_int}{100}{1}{0}}
accept
# ROUTERS ##################################################
begin routers
# ARCHIVE ####################
archive:
unseen
driver = accept
transport = archive_delivery
# FOREIGN ####################
# domain_literal:
# driver = ipliteral
# domains = ! +local_domains
# transport = remote_smtp
dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
# DOMESTIC ###################
system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/exim/aliases}}
# user = exim
# group = 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 ###############################################
begin transports
# ARCHIVE ####################
archive_delivery:
driver = appendfile
file = /raid/mail_archive/$tod_logfile
# FOREIGN ####################
remote_smtp:
driver = smtp
# DOMESTIC ###################
local_delivery:
driver = appendfile
file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
# group = exim
# 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 ####################################################
begin retry
# Address or Domain Error Retries
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
# REWRITE ##################################################
begin rewrite
# AUTHENTICATION ###########################################
begin authenticators
lookup_cram:
driver = cram_md5
public_name = CRAM-MD5
server_secret = ${lookup{$1}lsearch{/etc/exim/exim.passwd}{$value}fail}
server_set_id = $1
login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${lookup{$1}lsearch{/etc/exim/exim.passwd}{${if eq{$2}{$value}{yes}{no}}}{no}}
server_set_id = $1
login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${lookup{$1}lsearch{/etc/exim/exim.passwd}{${if eq{$2}{$value}{yes}{no}}}{no}}
server_set_id = $1
server_advertise_condition = 1