transport = remote_smtp
ignore_target_hosts = +reservedaddrs
+.ifdef SMARTHOST
+smarthost:
+ debug_print = "R: smarthost for $local_part@$domain"
+ driver = manualroute
+ domains = !+handled_domains
+ transport = remote_smtp_smarthost
+ route_list = * SMARTHOST
+ host_find_failed = defer
+ same_domain_copy_routing = yes
+ no_more
+.endif
# This router routes to remote hosts over SMTP using a DNS lookup.
# Ignore reserved network responses, including localhost.
dnslookup:
driver = smtp
connect_timeout = 1m
.ifdef USE_TLS
-# tls_tempfail_tryclear = true
tls_certificate = /etc/exim4/ssl/thishost.crt
tls_privatekey = /etc/exim4/ssl/thishost.key
-# tls_verify_certificates = /etc/exim4/ssl/ca.crt
-# tls_crl = /etc/exim4/ssl/ca.crl
+.endif
+
+remote_smtp_smarthost:
+ debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
+ driver = smtp
+.ifdef SMARTHOST_PORT
+ port = SMARTHOST_PORT
+.endif
+.ifdef USE_TLS
+ tls_tempfail_tryclear = false
+ tls_certificate = /etc/exim4/ssl/thishost.crt
+ tls_privatekey = /etc/exim4/ssl/thishost.key
.endif
# Send the message to procmail