Subject: Re: getaddrinfo() and IPV6 problem in fetchmail?
To: None <>
From: Patrick Welche <>
List: tech-net
Date: 02/10/2000 21:05:34
On Fri, Feb 11, 2000 at 02:10:23AM +0900, wrote:
> >I upgraded my "fetchmail", using NetBSD pkgsrc and suddenly it stopped
> >working. I just got:
> >fetchmail: fetchmail: getaddrinfo(
> >Some debugging revealed that getaddrinfo() returned EAI_SERVICE
> >(servname not supported for ai_socktype). The service it is trying to
> >use is "imap".
> 	Thanks very much for detailed analysis, getaddrinfo is not guilty
> 	here.  this is because of inconsistency between fetchmail source code
> 	(which uses "imap" service) and /etc/services (which has "imap2" only,
> 	as you have checked).
> 	fetchmail does not use getservbyname() in --disable-ipv6 compilation,
> 	it uses hardcoded decimal value for port # (so it have no problem with
> 	"imap" and "imap2" issue in --disable-ipv6 case).
> 	Not sure which side (fetchmail or /etc/services) should be corrected.

I noticed something similar with dhclient/dhcpd which looks for "dhcpc" or
"dhcp" (not "dhcps"), and if it fails, uses 68 or 67. Of course /etc/services
bootpc          68/udp
bootps          67/udp

Obviously still works with the hardcoded decimal values, just seems odd.