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

Inizio della pagina
Delete this message
Reply to this message
Autore: J.R.Haynes
Data:  
To: Marcin Mirosław
CC: exim-users@exim.org
Oggetto: Re: [exim] option "interface" in smtp transport and ipv6
On Thu, 1 Jul 2010 at 14:15 +0100, Marcin Mirosław wrote

> Hello!
> I've set up smtp transport in this way:
> external_smtp_batv:
>                driver          = smtp
>                return_path     = ${prvs {$return_path}{BATVKEY}}
>                dkim_domain     = +local_domains
>                dkim_selector   = 100623
>                dkim_private_key= /etc/ssl/poczta.cibet.pl.key
>                dkim_canon      = relaxed
>                interface       =
> ${lookup{$domain}lsearch{/etc/exim/domeny_interfejs.txt}{$value}{}}

>
> If recipient domain is found in appropriate file and destination mx
> doesn't have AAAA records everything works correctly. Problem appears
> when dest. mx has AAAA, then option "interface" is ignored and mail is
> sending using ipv6 proto.
> It looks there is bug in smtp tranposrt or option "interface" should
> named "interface_ipv4".


The spec says (smtp transport -> interface option)

The first interface of the correct type (IPv4 or IPv6) is used for the
outgoing connection. If none of them are the correct type, the option is
ignored. If interface is not set, or is ignored, the system's IP functions
choose which interface to use if the host has more than one.

(http://www.exim.org/exim-html-current/doc/html/spec_html/ch30.html#SECID146)

Since Exim has decided to use IPv6 the interface you specified is not of
the correct type so is ignored.


I seem to recall from when IPv6 support was first included in Exim that it
tries v6 before v4 but I can't actually find this in the spec at the
moment (although section 13.6 seems to imply this).

You can disable v6 by recompiling without HAVE_IPV6=YES. Less drastically
there is the disable_ipv6 global option, the dns_ipv4_lookup option to
specify domains for which to ignore AAAA records and the
ignore_target_hosts option which can be set to ignore all V6 addresses

ignore_target_hosts = <; 0::0/0

For an overview see section 13.6 - Disabling IPv6
(http://www.exim.org/exim-html-current/doc/html/spec_html/ch13.html#SECID93)

disable_ipv6 and dns_ipv4_lookup are main options listed in section
14.23
(http://www.exim.org/exim-html-current/doc/html/spec_html/ch14.html#SECTalomo)

and setting the ignore_target_hosts option to not use v6 is quoted in
section 15.
(http://www.exim.org/exim-html-current/doc/html/spec_html/ch15.html)


Disclaimer - I don't use V6 here at the moment so haven't actually tested
these - Exim is compiled without V6 support currently, although I'm
thinking of starting testing for some local deliveries fairly soon.


Hope this helps.

Jonathan


--
------------------------------------------------------------------------------

                              J. R. Haynes
                         Senior Network Specialist


      IT Department,                  e-mail: J.Haynes@???
      Bld 63,
      Cranfield University,           Tel: Bedford (01234) 754205
      Wharley End,                         Bedford (01234) 750111 Extn 4205
      Cranfield,                      Fax: Bedford (01234) 751814
      Beds.,
      MK43 0AL.