Get the App
SLTechnology News&Howtos  ›  Network Security  › 

There was an error in the telnet connection when postfix was testing the native machine.

Shulou Source: shulou.com Published: 2022-06-01 07:17:23 10月03日 Update

There is no problem with forward parsing and reverse parsing. The default port of postfix is 25.

Configure the profile for postfix

[root@www:/var/named] # cd / etc/postfix/ [root@www:/etc/postfix] # vim main.cf myhostname = www.crwolf.commyorigin = crwolf.commydomain = crwolf.commydestination = $myhostname, localhost.$mydomain, localhost, $mydomainmynetworks = 192.168.1.0 pick 24, 127.0.0.0 pick 8

Restart postfix and test

[root@www:/etc/postfix] # service postfix restart disable postfix: [OK] start postfix: [OK] [root@www:/etc/postfix] # vim / etc/resolv.conf nameserver 192.168.1.9 point DNS parsing to the native [root@www:/etc/postfix] # telnet mail.crwolf.com 25 Trying 192.168.1.9...telnet: connect to address 192.168.1.9: Connection refused # connection rejection [root@www:/etc/postfix] # telnet localhost 25 # Why is it possible locally? Trying:: 1...Connected to localhost.Escape character is'^] '.220 www.crwolf.com ESMTP Postfix

Check for problems

Check to see if there is a telnet service.

[root@www:/etc/postfix] # cd [root@www:~] # rpm-qa telnettelnet-0.17-48.el6.x86_64 # with [root@www:~] # rpm-qa telnet-server # without [root@www:~] # chkconfig-list xinetd-based service: # xinetd also does not have telnet [root@www:~] # yum install-y telnet-server # download telnet-server [root@www:~] # chkconfig-- list xinetd-based service: telnet: disable

There is telnet now, but the service is turned off. Turn it on.

[root@www:~] # service xinetd restart stop xinetd: [OK] starting xinetd: [OK] [root@www:~] # service telnet starttelnet: unrecognized service [root@www:~] # chkconfig telnet on [root@www:~] # chkconfig-- list based on xinetd Service: telnet: enable [root@www:~] # telnet mail.crwolf.com 25Trying 192.168.1.9...telnet: connect to address 192.168.1.9: Connection refused # or reject

View the configuration of telnet

[root@www:~] # vim / etc/xinetd.d/telnet disable = no # this is received

Take a look at the following configuration file for postfix

[root@www:~] # vim / etc/postfix/main.cf # inet_interfaces does not have $myhostname here, add inet_interfaces = localhost-- > inet_interfaces = localhost, $myhostname [root@www:~] # telnet www.crwolf.com 25 # can connect to Trying 192.168.1.9...Connected to www.crwolf.com.Escape character is'^] '.220 www.crwolf.com ESMTP Postfix

Tags: Service configuration file problem native test point in progress port or check Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MariaDB Docker Shulou Tech Info Linux