lucabert at lucabert
Apr 19, 2012, 12:20 AM
Post #5 of 5
Phil Pennock <exim-users [at] spodhuis> schrieb:
Re: How to choose the outgoing IPs for an E-Mail
[In reply to]
> Exim looks up the addresses to try, and filters the available source
> address to be one for that family. If you only provide an IPv4 address,
> then a connection to an IPv6 endpoint will not have a forced chosen IPv6
> source address.
That's right! I just forgot that... :(
> You can disable IPv6 in the configuration, with "disable_ipv6" in the
> main configuration section. You can also set "dns_ipv4_lookup" there,
> to point to domains that IPv6 lookups should be avoided for, if you know
> of broken servers.
> On a Router, you can use "ignore_target_hosts" to disable either IPv4 or
> IPv6, by specifying the relevant "any" address as the value.
> So you might use a forany/forall check against the result of the
> existing config file, combined with isip4/isip6, to decide if you have
> chosen an appropriate source address for that destination, and then set
> ignore_target_hosts appropriately. It will be a little convoluted to
> read. Or you might have the system which generates the existing lookup
> file also generate a different lookup file. Or you might duplicate the
> Router, make the first one IPv4-only with ignore_target_hosts set to a
> fixed string instead of a lookup but do the same forall/isip4 check,
> this time in a "condition" rule.
Yes, it will be very complicated...
I decided to do that:
driver = smtp
helo_data = $smtp_active_hostname
DEFAULT_IPv4 ; DEFAULT_IPv6}}
My /etc/exim/mailouts uses this format:
domain.tld: <; 126.96.36.199 ; 2001:1234::1
ipv4.domain.tld: <; 188.8.131.52 ; ::2
If I try to send an E-Mail from any address @ipv4.domain.tld Exim tries first
to bind to ::2 and it cannot, then it tries using 184.108.40.206.
I get a warning in my exim_mainfile, but I think, this is acceptable...
I don't think, I will use too much the option to just use IPv4, even if it
can be possible to use IPv6... It was just if in the future, I want to have a
domain that only use IPv4...
(lucabert [at] lucabert)
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/