Wietse Venema wrote on 2010-05-12:

> Uwe Dippel:
>> On 05/12/2010 07:13 PM, Wietse Venema wrote:
>> >> "fetchmail: connection to localhost:smtp [::1/25] failed: Connection
>> >> refused." is what I get in the mail at *:05.
>> >>
>> > Fetchmail wants to connect over IP VERSION 6.
>> >
>> > Apparently, Postfix does not listen on IP VERSION 6.
>> >
>>
>> Apparently.
>> Maybe I should ask on a fetchmail list, why fetchmail always and only 5
>> minutes past the hour tries to connect over IPv6!?
>
> It is only speculation, but perhaps fetchmail uses IPv6 because
> you have a record with:
>
>       ::1     localhost ...
>
> in /etc/hosts. That would explain why fetchmail tries to use that
> information. Of course it is not very nice that fetchmail spams
> you with error messages for this.

To confirm your speculations, indeed fetchmail 6.3.X would default its
outbound mail to localhost port 25 via SMTP, and use getaddrinfo() to
resolve localhost. This is documented.

Also, the cron spam can be silenced with - oh wonders - fetchmail's
--silent option. This is also documented.

Fetchmail versions 6.3.10 and newer (Ubuntu ships a 6.3.9 release
candidate) also use AI_ADDRCONFIG where supported by the OS, but that
doesn't help in this case because there is an IPv6 address configured
(else the error message would be unupported address, no route to host,
or  similar).

> So the "solution" is to nuke this entry from /etc/hosts or to turn
> on IPv6 support in Postfix (inet_protocols = all).

Workaround if the original reporter cannot fix /etc/hosts would be to
add  --smtphost 127.0.0.1 to fetchmail's command line, or smtphost
127.0.0.1 in  a "defaults" section of the rcfile.


[
EXCURSION:

I'd also like to mention that Ubuntu 10.04 LTS ("lucid lynx") ships a
way  outdated fetchmail version, because Ubuntu couldn't be bothered to
package  an up-to-date that was available before their freeze date. They
were told  weeks sooner and ignored the request.  Their excuse was not
having time to  adjust their local patches.  How convincing.  If more of
this crap hits  the lists, we'll need to put GPL clause 2a to the test ;-)
]


-- 
Matthias Andree

Reply via email to