Re: [Exim] Mailrouting based on IPv6?

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Sven Geggus
CC: exim-users
Subject: Re: [Exim] Mailrouting based on IPv6?
On Tue, 8 Jul 2003, Sven Geggus wrote:

> is it possible to configure exim in a Way, that recepients with IPv6
> Adresses use a special smarthost (using manualroute), while IPv4 Adresses
> are routed as usual?


Not directly. What would you want to do if a domain had both? For
example:

x.x.x.x   MX   6  a.host
          MX   6  b.host


a.host    A      <an IPv4 address>
b.host    AAAA   <an IPv6 address>


or even a single host that had both kinds of address?

You can use a dnsdb lookup to test if a domain has an AAAA record, but
it isn't straightforward to do that test indirectly via MX records.

Of course, you could certainly do it by writing a program/script that
did the test, and then calling the script using ${run but that would be
quite expensive because it requires a separate process each time.

Oh, just had an Bright Idea (tm). Suppose your first router is a
dnslookup router. If you set

ignore_target_hosts = <; 0000::0000/128

the router will drop all IPv6 addresses. If it ends up with any v4
addresses, it will succeed, and accept the email address. On the other
hand, if ALL the addresses are IPv6 (and are therefore dropped), the
router will decline, and control will pass to the next router. (Of
course, you must NOT put no_more on the first router.)

Or you could do it the other way round and drop all v4 addresses.

The next router must do some checking of course, because it will also be
receiving unrouteable domains, as well as those that have just the
"wrong" kind of IP address.

I haven't worked this out fully, but I hope it give you some ideas.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book