1

I'm getting the mesage regulary inside mail.log from postfix. In special, but not only, at mails send received mailman.

warning: hostname localhost does not resolve to address ::1: No address associated with hostname

::1 as well as 127.0.0.1 are defined as localhost inside /etc/hosts -- as provided by openVZ.

Actually inside /etc/hosts these is configured (I removed special domains and IP for reasons):

fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

2a01::<some IPv6> host.example.org  host example.org

127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
xxx.xxx.xxx.xxx host.example.org  host example.org
::1             localhost ip6-localhost ip6-loopback

And this seems to work:

$ host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1

On this box bley is also running.

frlan
  • 573
  • 1
  • 8
  • 27
  • 1
    This should help https://groups.google.com/forum/#!topic/mailing.postfix.users/KgPJCKphvoc Check your /etc/host.conf file – clement Apr 04 '14 at 12:39

4 Answers4

2

It seems adding

multi on

to /etc/host.conf hase solved the issue.

Based on what I've found on the internet, this is allowing to have multiple IP for one host name (in this case localhost) which fit for IPv4 address and IPv6.

frlan
  • 573
  • 1
  • 8
  • 27
  • It's bizarre that this is off by default. There are no sites with large hosts files anymore. Not for 25 years or so... – Michael Hampton Jul 25 '14 at 21:59
  • Well... it really happened on Debian (old)Stable -- not sure whether it was really an upstream issue or something I messed up. – frlan Aug 05 '14 at 09:20
0

In addition: Postfix states that adding

import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY LANG=C RESOLV_MULTI=on

to your /etc/postfix/main.cf solves this too. It worked for me only this way.

Stephan Weinhold
  • 177
  • 1
  • 1
  • 6
0

In addition to the frlan answer given, on a Ubuntu 12.04 system the /etc/host.conf has "multi on" and the etc/hosts file correctly identifies both ipV4 and ipV6 localhost address.

The problem was still happening, and in my case was in the postfix init script as outlined in this Debian log:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=723915

So applying the (simple) patch to /etc/init.d/postfix meant that Postfix used the /etc/host.conf and the problem disappeared.

Postfix v 2.9.6

Mike
  • 36
  • 2
-1

Change in your /etc/hosts:

::1 localhost 

to

::1 localhost6.localdomain localhost6 ip6-localhost ip6-loopback

If don't work, post your /etc/hosts, please.

PoLIVoX
  • 195
  • 1
  • 1
  • 6