When using telnet to make a connection to a Postfix email server, we will enter telnet and then the domain name or IP address and then port 25 of the Postfix email server, such as telnet 10.4.131.22 25. When issuing this command, if error no route to host is displayed, this typically implies there is some type of configuration on the Postfix server which is refusing connections from remote machines. This is typically a good thing, as we wouldn't want to open up the Postfix email server to the Internet, and let anyone and everyone relay emails through our Postfix server. However, there could be a scenario where computers in your LAN should be allowed to relay emails through your Postfix email server. There are four things to first check on the Postfix server.
- iptables / firewall
- hosts allowed / hosts denied
- Postfix main configuration
If the Postfix server is not being used in a production environment, the firewall service on the Postfix server can temporarily be disabled to determine if the firewall service is refusing the connection. Depending on the Linux distro being used, and the type of firewall being used, one of the following commands would be used to disable and then reenable the firewall service.
|service firewalld start||service firewalld stop||service firewalld status|
|service iptables start||service ipables stop||service iptables status|
|systemctl firewalld start||systemctl stop firewalld||systemctl firewalld status|
|systemctl start iptables||systemctl stop ipables||systemctl status iptables|
More to be determined . . .