How to fix postfix/smtp Network is unreachable error


While configuration postfix authentication getting the error

status=deferred (delivery temporarily suspended: connect to smtp.office365.com[2603:1026:3:ca::2]:587: Network is unreachable)

its because of you were not using IPv6/ wrong settings for ipv6. You can either use IPv4, or correct your IPv6 settings.

[root@mailserver postfix]# netstat -nutlap | grep 25
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      3956/master
tcp        0      0 127.0.0.1:38442         127.0.0.1:3306          ESTABLISHED 2596/httpd
[root@mailserver postfix]# vi /etc/postfix/main.cf
[root@mailserver postfix]# systemctl restart postfix
[root@mailserver postfix]# netstat -nutlap | grep 25
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      4079/master
tcp        0      0 127.0.0.1:38442         127.0.0.1:3306          ESTABLISHED 2596/httpd
tcp6       0      0 :::25                   :::*                    LISTEN      4079/master
[root@mailserver postfix]#


To fix the error: - 
In main.cf configuration, we need change inet_protocols from all to ipv4.

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

[root@localhost ~]#

Comments

Popular Posts

Install and configure rsyslog Centralized logging server in CentOS

Could not join realm: Necessary packages are not installed: sssd-tools sssd libnss-sss libpam-sss adcli