Re: exim, local resolver, host name lookups and IPv6

2008-04-15 Thread Marc Haber
On Fri, 11 Apr 2008 16:41:26 +0200, Marc Haber <[EMAIL PROTECTED]> wrote: >To avoid the extra DNS lookups, the Exim packages have a Debconf >option to configure exim for "minimal DNS usage", which hardcodes the >hostname into Exim's configuration at package configuration time. ... which silently d

Re: exim, local resolver, host name lookups and IPv6

2008-04-14 Thread Robert Edmonds
On 2008-04-12, Marc Haber <[EMAIL PROTECTED]> wrote: > On Fri, 11 Apr 2008 17:48:19 + (UTC), Robert Edmonds ><[EMAIL PROTECTED]> wrote: >>Yes, there is a much better way: do not perform name resolution to >>determine the host's FQDN. It is wrong. > > This is what exim does to determine the loc

Re: exim, local resolver, host name lookups and IPv6

2008-04-14 Thread Stephen Gran
This one time, at band camp, Gabor Gombas said: > On Sat, Apr 12, 2008 at 10:41:54AM +0200, Marc Haber wrote: > > > Where can I obtain the FQDN of the system instead? > > _Which_ FQDN? A machine may have several IP addresses, in the DNS there > may be multiple A records for every IP address (and

Re: exim, local resolver, host name lookups and IPv6

2008-04-14 Thread Gabor Gombas
On Sat, Apr 12, 2008 at 10:41:54AM +0200, Marc Haber wrote: > Where can I obtain the FQDN of the system instead? _Which_ FQDN? A machine may have several IP addresses, in the DNS there may be multiple A records for every IP address (and the reverse PTR records may be completely meaningless placeh

Re: exim, local resolver, host name lookups and IPv6

2008-04-14 Thread Vincent Danjean
Marc Haber wrote: > On Sat, 12 Apr 2008 14:58:24 +, The Fungi <[EMAIL PROTECTED]> > wrote: >> On Sat, Apr 12, 2008 at 10:41:54AM +0200, Marc Haber wrote: >> [...] >>> Where can I obtain the FQDN of the system instead? >> [...] >> >> You can't, necessarily. > > So it needs to be in /etc/hosts.

Re: exim, local resolver, host name lookups and IPv6

2008-04-13 Thread Alexander E. Patrakov
Steve Langasek wrote: On Sat, Apr 12, 2008 at 12:13:36PM +0600, Alexander E. Patrakov wrote: Marc Haber wrote: In some cases, exim still looks up its IP address when a listening daemon starts up. This is why the Debian installer configures 127.0.1.1 (not 127.0.0.1) for the local hostname on ins

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread Marc Haber
On Sat, 12 Apr 2008 14:58:24 +, The Fungi <[EMAIL PROTECTED]> wrote: >On Sat, Apr 12, 2008 at 10:41:54AM +0200, Marc Haber wrote: >[...] >> Where can I obtain the FQDN of the system instead? >[...] > >You can't, necessarily. So it needs to be in /etc/hosts. >Is there any way to simply >*insis

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread Marc Haber
On Sat, 12 Apr 2008 11:32:32 +0200, "Bernhard R. Link" <[EMAIL PROTECTED]> wrote: >* Marc Haber <[EMAIL PROTECTED]> [080412 10:30]: >> >I don't think that is only limited to additional lookups. I think I've >> >also seen a message not being sent on etch, because the target host >> >also had a

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread The Fungi
On Sat, Apr 12, 2008 at 10:41:54AM +0200, Marc Haber wrote: [...] > Where can I obtain the FQDN of the system instead? [...] You can't, necessarily. Especially if the MTA is running on RFC 1918 addresses behind a NAT and relying on external DNS (which I expect is becoming quite common these days).

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread Tollef Fog Heen
* "Bernhard R. Link" | * Marc Haber <[EMAIL PROTECTED]> [080412 10:30]: | > >I think the main problem is that Debian is by default setting up those | > >ipv6 stuff into the interface even when you are in an pure ipv4 | > >environment. That way exim4 cannot do anything to avoid ipv6 stuff | > >and

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread Bernhard R. Link
* Marc Haber <[EMAIL PROTECTED]> [080412 10:42]: > [...] Thankfully, gethostbyname2 is > used in exim's source code only twice (with one of the occurrences > being inside an if( primary_hostname == NULL ) which doesn't apply if > primary_hostname is set in configuration, which is the case if exim i

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread Bernhard R. Link
* Marc Haber <[EMAIL PROTECTED]> [080412 10:30]: > >I think the main problem is that Debian is by default setting up those > >ipv6 stuff into the interface even when you are in an pure ipv4 > >environment. That way exim4 cannot do anything to avoid ipv6 stuff > >and evil things like this can happen

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread Marc Haber
On Fri, 11 Apr 2008 17:48:19 + (UTC), Robert Edmonds <[EMAIL PROTECTED]> wrote: >Yes, there is a much better way: do not perform name resolution to >determine the host's FQDN. It is wrong. This is what exim does to determine the local host name: |This variable contains the value set by primar

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread Marc Haber
On Fri, 11 Apr 2008 18:09:27 +0200, "Bernhard R. Link" <[EMAIL PROTECTED]> wrote: >* Marc Haber <[EMAIL PROTECTED]> [080411 16:41]: >> To avoid the extra DNS lookups, the Exim packages have a Debconf >> option to configure exim for "minimal DNS usage", which hardcodes the >> hostname into Exim's co

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread Marc Haber
On Fri, 11 Apr 2008 16:50:17 +0200, Mike Hommey <[EMAIL PROTECTED]> wrote: >On Fri, Apr 11, 2008 at 04:41:26PM +0200, Marc Haber <[EMAIL PROTECTED]> wrote: >> Exim has the habit of trying to find out about its host names and IP >> addresses when it starts up. This has, in the past, been an issue fo

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread Marc Haber
On Sat, 12 Apr 2008 12:13:36 +0600, "Alexander E. Patrakov" <[EMAIL PROTECTED]> wrote: >Marc Haber wrote: >> This being said, I consider the entire 127.0.1.1 business a horrible >> hack which is one of the most ugly things I have ever seen. Do we have >> a chance to implement this in a more cleaner

Re: exim, local resolver, host name lookups and IPv6

2008-04-12 Thread Steve Langasek
On Sat, Apr 12, 2008 at 12:13:36PM +0600, Alexander E. Patrakov wrote: > Marc Haber wrote: >> In some cases, exim still looks up its IP address when a listening >> daemon starts up. This is why the Debian installer configures >> 127.0.1.1 (not 127.0.0.1) for the local hostname on installation, >> y

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Tollef Fog Heen
* "Bernhard R. Link" | I think the main problem is that Debian is by default setting up those | ipv6 stuff into the interface even when you are in an pure ipv4 | environment. That way exim4 cannot do anything to avoid ipv6 stuff | and evil things like this can happen. | | I don't think that is o

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Alexander E. Patrakov
Marc Haber wrote: In some cases, exim still looks up its IP address when a listening daemon starts up. This is why the Debian installer configures 127.0.1.1 (not 127.0.0.1) for the local hostname on installation, yielding /etc/hosts files like 127.0.0.1 localhost 127.0.1.1 myfoo.lo

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Gabor Gombas
On Fri, Apr 11, 2008 at 04:50:17PM +0200, Mike Hommey wrote: > Host name can be returned by gethostname(2), for example, and you can > add the result from getdomainname(2) for an FQDN. Those syscalls has _nothing_ to do with DNS so they can not be used to form FQDNs. gethostname() is sadly often

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Robert Edmonds
Guus Sliepen wrote: > From the getipnodebyname(3) manpage: > > NOTES >These functions were present in glibc 2.1.91-95, but were removed >again. Several Unix-like systems support them, but all call them >deprecated. > > The best way is to use getaddrinfo() and getnameinfo(

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Guus Sliepen
On Fri, Apr 11, 2008 at 05:48:19PM +, Robert Edmonds wrote: > Why is exim using gethost* calls? If you look in the > exim-4.69/src/host.c file, you'll see implementation details like: > > #if HAVE_GETIPNODEBYNAME > hostdata = getipnodebyname(CS host->name, af, 0, &error_num); > #

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Robert Edmonds
On 2008-04-11, Florian Weimer <[EMAIL PROTECTED]> wrote: > * Bernhard R. Link: > >> I think the main problem is that Debian is by default setting up those >> ipv6 stuff into the interface even when you are in an pure ipv4 >> environment. That way exim4 cannot do anything to avoid ipv6 stuff >> and

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Robert Edmonds
On 2008-04-11, Marc Haber <[EMAIL PROTECTED]> wrote: > Hi, > > Exim has the habit of trying to find out about its host names and IP > addresses when it starts up. This has, in the past, been an issue for > the Debian packages, since a Debian system might be on a > dial-on-demand modem line with exp

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Florian Weimer
* Bernhard R. Link: > I think the main problem is that Debian is by default setting up those > ipv6 stuff into the interface even when you are in an pure ipv4 > environment. That way exim4 cannot do anything to avoid ipv6 stuff > and evil things like this can happen. Yes, I agree this is a proble

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Florian Weimer
* Mike Hommey: > The main question to be able to answer your question correctly is: > what does it need these information for ? It needs to know all of its own host names in order to recognize local mail. At least I think this is the motivation; obviously, using reverse lookup to gather this dat

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Bernhard R. Link
* Bernhard R. Link <[EMAIL PROTECTED]> [080411 18:16]: > And the "CONFORMING TO" part getdomainname(2) does not look very > promissing, too. actually, the manpage seems to miss the most important part: getdomainname is supposed to return "(none)", if the system is not using NIS according to LSB an

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Bernhard R. Link
* Mike Hommey <[EMAIL PROTECTED]> [080411 16:51]: > The main question to be able to answer your question correctly is: > what does it need these information for ? > The alternate question being: Does it really need this information from > DNS ? > > Host name can be returned by gethostname(2), for e

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Bernhard R. Link
* Marc Haber <[EMAIL PROTECTED]> [080411 16:41]: > To avoid the extra DNS lookups, the Exim packages have a Debconf > option to configure exim for "minimal DNS usage", which hardcodes the > hostname into Exim's configuration at package configuration time. This > was necessary since - without this o

Re: exim, local resolver, host name lookups and IPv6

2008-04-11 Thread Mike Hommey
On Fri, Apr 11, 2008 at 04:41:26PM +0200, Marc Haber <[EMAIL PROTECTED]> wrote: > Hi, > > Exim has the habit of trying to find out about its host names and IP > addresses when it starts up. This has, in the past, been an issue for > the Debian packages, since a Debian system might be on a > dial-o