Re: [exim] Blocking names from name@ip-address

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: De Ranter, Nico
CC: exim-users
Subject: Re: [exim] Blocking names from name@ip-address
On 2011-08-24 at 10:37 +0100, De Ranter, Nico wrote:
> Hi Phil,
>
> when I try
>
>      exim -bt test@110.1.1.1

>
> I get
>
>     R: smarthost for test@110.1.1.1
>     test@110.1.1.1
>       router = smarthost, transport = remote_smtp_smarthost
>       host x.x.x.x [x.x.x.x]

>
> (the server is intended as a filter in front of our main mail server)


Ah. Since the smarthost won't route that, you probably don't want to
send it anyway.

Your available solutions depend upon whether or not you're permanently
online.

If you're not, then your best bet is to use an ACL rejection, based on
$sender_address_domain, as Frank suggests.

If you are permanently online, then what I've used in a smarthost setup
is this (slightly simplified):

----------------------------8< cut here >8------------------------------
remote_dns_verify:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = +special_ipv4_bad
same_domain_copy_routing
verify_only

smarthost:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = +special_ipv4_bad
route_data = SMARTHOST_NAME
same_domain_copy_routing
no_verify
----------------------------8< cut here >8------------------------------

This uses one hostlist, "special_ipv4_bad", feel free to replace as you
see fit, that's not the important bit.

The main thing is that when _verifying_, you use dnslookup to verify
that DNS exists and the domain can be routed to. When _delivering_, you
just send it to the smarthost.

Regards,
-Phil