Do you know how you will be getting this error? It’s mostly because of the port blocking at the end of the ISP or host. When you try to send the email, you will be getting the error:
Reason 1:
The firewall gets blocked with port 25 that’s because of the iptables which ignore a few things like icmp-host-unreachable or icmp-net-unreachable.
Here’s the list of rejects which is valid through a frequency:
Its default activity is to pass the message port-reachable to the direction of the host.
If you want to see the iptables kindly execute the command:
Reason 2:
As said, the port may get blocked at the end of the ISP or hosting side:
Here’s the command to have a small test:
Reason 3:
Sometimes, you may get offline in the host. Check whether it is online or not:
Most probably, your service will not be open right now! Run the below command to check the service is opened or not:
You might have used the port wrongly or the configuration of DNS is not in correct way.
Just do IP address ping so that, try to connect it soon. Check whether the computer is connecting to the server of DNS properly or not.
If you don’t have a problem with connectivity then the problem might be in the DNS.
The main cause is the incorrect host configuration or network.
Let us check the solution for this problem:
Step 1: Open up the port in the firewall server. You can connect with the ISP or support the host to take the block. Have a quick reminder that we have discussed in starting the block in host or ISP may bring this problem to you unexpectedly.
Step 2: Try using another port 587. Right now, the configuration of DNS may be incorrect.
Cross-check the server of DNS by running the systemd-resolve –status by the users of Systemd.
Using DHCP, your computer will start displaying more things. Set the manual configuration of DNS so that, your network may get a different configuration.
Open “/etc/resolv.conf.”
Start uncommenting the line of DNS and try to add the router of IP.
Check the connectivity and configuration are working correctly or not. Go through the configurations such as “/etc/hosts.deny”, “/etc/hosts.allow” and “/etc/hosts,”.
Code:
SMTP ERROR: Failed to connect to server: No route to host (65)
The firewall gets blocked with port 25 that’s because of the iptables which ignore a few things like icmp-host-unreachable or icmp-net-unreachable.
Code:
-j REJECT –reject-with icmp-host-unreachable
Code:
icmp-net-unreachable
icmp-host-unreachable
icmp-port-unreachable
icmp-proto-unreachable
icmp-net-prohibited
icmp-host-prohibited.
If you want to see the iptables kindly execute the command:
Code:
sudo iptables -S
As said, the port may get blocked at the end of the ISP or hosting side:
Here’s the command to have a small test:
Code:
telnet server_nameport_number
Sometimes, you may get offline in the host. Check whether it is online or not:
Code:
ping server_ip
Code:
sudosystemctl status SERVICENAME
Just do IP address ping so that, try to connect it soon. Check whether the computer is connecting to the server of DNS properly or not.
Code:
ping -c3 your.server.ip
The main cause is the incorrect host configuration or network.
Let us check the solution for this problem:
Step 1: Open up the port in the firewall server. You can connect with the ISP or support the host to take the block. Have a quick reminder that we have discussed in starting the block in host or ISP may bring this problem to you unexpectedly.
Step 2: Try using another port 587. Right now, the configuration of DNS may be incorrect.
Cross-check the server of DNS by running the systemd-resolve –status by the users of Systemd.
Using DHCP, your computer will start displaying more things. Set the manual configuration of DNS so that, your network may get a different configuration.
Open “/etc/resolv.conf.”
Start uncommenting the line of DNS and try to add the router of IP.
Check the connectivity and configuration are working correctly or not. Go through the configurations such as “/etc/hosts.deny”, “/etc/hosts.allow” and “/etc/hosts,”.