out
%>
+<%=
+out = ""
+if nodeinfo['smarthost'].empty?
+ out = "
# These are in HELO acl so that they are only run once. They increment a counter,
# so we don't want it to increment per rcpt to.
condition = ${if match {${lc:$sender_helo_name}}{\N.*[bcdfghjklmnpqrstvwxz]{7,}.*\.[a-z]+$\N}}
log_message = random HELO
set acl_c_scr = ${eval:$acl_c_scr+5}
+"
+end
+out
+%>
# Implicit, but simpler to just say it
accept
senders = ${if exists{/etc/exim4/blacklist}{/etc/exim4/blacklist}{}}
message = We have blacklisted <$sender_address>. Please stop mailing us
+<%=
+out = ""
+if nodeinfo['smarthost'].empty?
+ out = "
deny message = host $sender_host_address is listed in $dnslist_domain; see $dnslist_text
dnslists = ${if match_domain{$domain}{+virtual_domains}\
{${if exists {${extract{directory}{VDOMAINDATA}{${value}/rbllist}}}\
${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-rbl}{$value}{}}}}
domains = +handled_domains : +rcpthosts
!hosts = +debianhosts : WHITELIST
+"
+end
+out
+%>
deny message = domain $sender_address_domain is listed in $dnslist_domain; see $dnslist_text
dnslists = ${if match_domain{$domain}{+virtual_domains}\
domains = +handled_domains : +rcpthosts
!hosts = +debianhosts : WHITELIST
+<%=
+out = ""
+if nodeinfo['smarthost'].empty?
+ out = "
deny domains = +handled_domains : +rcpthosts
local_parts = ${if match_domain{$domain}{+virtual_domains}\
{${if exists {${extract{directory}{VDOMAINDATA}{${value}/callout_users}}}\
${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-callout}{$local_part}{}}}}
!hosts = +debianhosts : WHITELIST
!verify = sender/callout
+"
+end
+out
+%>
<%=
out = ""
driver = manualroute
domains = !+handled_domains
transport = remote_smtp_smarthost
- route_list = * ' + nodeinfo['smarthost'] + '
+ route_list = * ' + nodeinfo['smarthost']
+ if nodeinfo['smarthost'] == 'mailout.debian.org'
+ out += '/MX'
+ end
+ out += '
host_find_failed = defer
same_domain_copy_routing = yes
no_more