Howto fix postfix/smtp Network is unreachable error

Howto fix postfix/smtp Network is unreachable error

postfix mail server

 

 

1. When you get error on Postfix as

Mar 22 04:38:15 localhost postfix/pickup[16454]: 83241A249E: uid=0 from=<root>
Mar 22 04:38:15 localhost postfix/cleanup[16461]: 83241A249E: message-id=<20130322113815.83241A249E@localhost.localdomain>
Mar 22 04:38:15 localhost postfix/qmgr[16455]: 83241A249E: from=<root@localhost.localdomain>, size=458, nrcpt=1 (queue active)
Mar 22 04:38:15 localhost postfix/smtp[16463]: connect to smtp.gmail.com[2607:f8b0:400e:c01::6c]:25: Network is unreachable
Mar 22 04:38:17 localhost postfix/smtp[16463]: 83241A249E: to=<kevin.ngo@ithelpblog.com>, relay=smtp.gmail.com[173.194.79.108]:25, delay=1.5, delays=0.03/0.01/1.3/0.2, dsn=5.7.0, status=bounced (host smtp.gmail.com[173.194.79.108] said: 530 5.7.0 Must issue a STARTTLS command first. oq3sm2674442pac.16 – gsmtp (in reply to MAIL FROM command))
Mar 22 04:38:17 localhost postfix/cleanup[16461]: 4A1D6A24A1: message-id=<20130322113817.4A1D6A24A1@localhost.localdomain>
Mar 22 04:38:17 localhost postfix/qmgr[16455]: 4A1D6A24A1: from=<>, size=2482, nrcpt=1 (queue active)
Mar 22 04:38:17 localhost postfix/bounce[16464]: 83241A249E: sender non-delivery notification: 4A1D6A24A1
Mar 22 04:38:17 localhost postfix/qmgr[16455]: 83241A249E: removed
Mar 22 04:38:17 localhost postfix/local[16465]: 4A1D6A24A1: to=<root@localhost.localdomain>, relay=local, delay=0.01, delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 22 04:38:17 localhost postfix/qmgr[16455]: 4A1D6A24A1: removed

Check service on Linux, we can see it’s running on IPv6 and we need disable IPv6 on postfix configuration

[root@localhost ~]# netstat -nutlap | grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 16690/master
tcp 1 0 192.168.0.114:51153 60.254.175.67:80 CLOSE_WAIT 4545/clock-applet
tcp 0 0 :::80 :::* LISTEN 2508/httpd
tcp 0 0 ::1:25 :::* LISTEN 16690/master

2. Howto fix the error

In main.cf configuration, we need change inet_protocols from all to ipv4.

[root@localhost ~]# vi /etc/postfix/main.cf# Enable IPv4, and IPv6 if supported
# inet_protocols = all
inet_protocols = ipv4
[root@localhost ~]# /etc/init.d/postfix restart
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]
[root@localhost ~]#

Checking

[root@localhost ~]# netstat -nutlap | grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 16995/master
tcp 1 0 192.168.0.114:51153 60.254.175.67:80 CLOSE_WAIT 4545/clock-applet
tcp 0 0 :::80 :::* LISTEN 2508/httpd
[root@localhost ~]#

Now Postfix service is not running on IPv6.

That’s all. Thanks for using IThelpblog.com.

Tags:  

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>