Re: [exim] option "interface" in smtp transport and ipv6

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Marcin Mirosław
Datum:  
To: exim-users
Betreff: Re: [exim] option "interface" in smtp transport and ipv6
W dniu 2010-07-01 22:23, Phil Pennock pisze:
> On 2010-07-01 at 21:47 +0200, Marcin Mirosław wrote:
>>> Use something like (untested):
>>>    ignore_target_hosts = <; ::
>>> on the Router to refuse to use IPv6 addresses.  Or there's
>>> dns_ipv4_lookup as a global option, per "13.6 Disabling IPv6".

>>
>> But i don't want to disable ipv6!:)
>> I.E. My domain: host hermes.mejor.pl
>> hermes.mejor.pl has address 193.238.12.139
>> hermes.mejor.pl has IPv6 address 2001:470:1f0b:84c::2
>>
>> From other host (on which i setup transport using interafce=1.2.3.4) i'm
>> trying to send mail to domain "mejor.pl". I'd like to send mail via ipv4
>> (not via ipv6), because there are two links, and link with ipv4 only is
>> faster than link with ipv6. So i put domain "mejor.pl" to file
>> "domeny_interfejs.txt" and i'm expecting that exim will use address
>> (ipv4) taken from file, and sends via ipv4, although ipv6 can be used
>> for this domain.
>> For other domain, not mention in file, i'd like exim to use ipv6 if
>> domain is capable.
>
> Right, so you'll get exactly your desired behaviour if you implement the
> main suggestion: use ignore_target_hosts on the Router which uses the
> domeny_interfejs.txt file, to block all IPv6 addresses *for that
> Router*.


I know that i know nothing about exim, but maybe it's late for me:)
When I used ignore_target_hosts on router, sending over ipv6 was
completly disabled. And exim sends email using desired address ip. One
bad and one good news;).
So what to do with ipv6 now? Something like this in router?:
ignore_target_hosts = <;
${lookup{$domain}lsearch{/etc/exim/domeny_interfejs.txt}{::}{}}
And still i can't understand why i can explicit use given address ip (v4
or v6) even when destination can be reached using both protocols. I can
imagine i can't force to use v4 to send mail when destination has only
AAAA record. It's time to sleep.

Thanks Phil, Jonathan for help.
Regards,
Marcin

P.S. Let's imagine there are more than one physical interface with v4
and more than on with v6. In router i'm putting:
interface = <; 1.2.3.4 ; 2001::1234:4321
In this case, mail would be send:
a) if domain has only A -> with outgoing ip 1.2.3.4
b) if domain has only AAAA -> with outgoing ip 2001::1234:4321
c) if domain has both records - > with outgoing ip 2001::1234:4321
(because ipv6 is preffered over v4)
?