How to fix SMTP error no route to host?

How to fix SMTP error no route to host?

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:

SMTP ERROR: Failed to connect to server: No route to host (65)
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.

-j REJECT –reject-with icmp-host-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:

sudo iptables -S
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:

telnet server_nameport_number
Reason 3:

Sometimes, you may get offline in the host. Check whether it is online or not:

ping server_ip
Most probably, your service will not be open right now! Run the below command to check the service is opened or not:

sudosystemctl status SERVICENAME
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.

ping -c3 your.server.ip
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,”.
First release
Last update
0.00 star(s) 0 ratings

More resources from kumkumsharma