19

I have server with RHEL 6 and postfix (postfix-2.6.6-2.2.el6), When I try to send email to Google I'm getting this in /var/logmaillog:

postfix/smtp[13414]: 6F4DC10406E7: to=<[email protected]>, relay=none, delay=0.16, delays=0.02/0/0.14/0, dsn=4.4.1, status=deferred (connect to aspmx.l.google.com[2a00:1450:4013:c01::1b]:25: Network is unreachable)

This error occurs only on this domain (englishonlineuniversity.com).

What does it mean connect to aspmx.l.google.com:25: Network is unreachable?

2 Answers 2

23

This means your MTA is trying to connect to the Google SMTP via IPv6 (2a00:1450:4013:c01::1b). This doesn't work as your network probably doesn't support IPv6.

To get rid of the error message, you can configure Postfix not to use IPv6 by editing your /etc/postfix/main.cf with this directive:

inet_protocols = ipv4

Afterwards you'll have to restart postfix:

/etc/init.d/postfix restart
5
  • It probably means that there is some issue with his name resolution, or routing to the IPv4 MX also, as unless you configure postfix as IPv6 only, it will always try the IPv4 answers, then the IPv6 responses.
    – NickW
    Mar 28, 2013 at 9:45
  • 1
    To be able to tell that, one would need to see the rest of the log. The provided line only tells that IPv6 connection is not working. Perhaps the mail is delivered via IPv4 in the next line. As far as I know, postfix will per default try IPv6 first, then IPv4 as fallback: postfix.org/postconf.5.html#smtp_address_preference
    – etagenklo
    Mar 28, 2013 at 10:44
  • You're right, that has changed, as specified here: postfix.org/postconf.5.html#inet_protocols
    – NickW
    Mar 28, 2013 at 10:50
  • 1
    This won't help, when the problem really is that the server isn't connected to the Internet. Mar 28, 2013 at 14:07
  • 2
    You can also use smtp_address_preference = ipv4 instead of completely disabling ipv6 May 8, 2019 at 19:27
1

Some ISPs don't allow localhost as a domain name (QFDN) and will reject incoming email from your server. In /etc/postfix/main.cf alter the following:

myhostname = localhost

to a fully qualified domain name you own, i.e:

myhostname = geoip-db.com
mydestination = geoip-db.com, localhost.localdomain, localhost

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .