sendEmail trying to use ipv6

David Fletcher dave at thefletchers.net
Mon Mar 19 13:45:47 UTC 2018


On Tue, 2018-03-20 at 00:08 +1100, Karl Auer wrote:
> On Mon, 2018-03-19 at 12:32 +0000, David Fletcher wrote:
> > 
> > it responds with:-
> > Mar 19 10:53:41 serveriii sendEmail[25721]: ERROR => localhost:25
> > returned a zero byte response to our query.
> Is your program trying to send email to localhost? If so, check your
> /etc/hosts file and make sure that localhost is not being translated
> into an IPv6 address.

My program is running on the same machine as postfix and the rest of
the mail server so yes it's running on the localhost. I remember I had
to set
mynetworks = 192.168.2.0/24 localhost
in the postfix main.cf to get this to work.

My /etc/hosts file has always had:-
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

in it. Could this suddenly be causing the problem?

Sorry I don't yet know much about IPv6, having not had the opportunity
to use it.

> 
> It looks to me as if something that never used to resolve to an IPv6
> address is now resolving to an IPv6 address (possibly ONLY to an IPv6
> address) and your program can't use it.
> 
> Also, look in your postfix main.cf and look for a line like
> "inet_protocols = XXXX". If "XXXX" is anything except "ipv4", then
> comment out the line by putting a hash symbol in front of it, and ADD
> this line just below it:
> 
> inet_protocols = ipv4

Yes that's always been the last line of my main.cf. I added that one
years ago as part of a how-to for getting it to use SASL for using the
authenticated SMTP box at 1&1 for my outgoing mail.

Dave




More information about the ubuntu-users mailing list