无法在 centos 上 telnet localhost 25

无法在 centos 上 telnet localhost 25

我已经安装并配置了 postfix,但是当我测试 telnet 时

我得到了结果

Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

我尝试使用更多方法来解决问题,但找不到解决方案。

主配置文件

smtp      inet  n       -       n       -       -       smtpd
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
smtps     inet  n       -       n       -       -       smtpd
#-o smtpd_sasl_auth_enable=yes
#-o smtpd_reject_unlisted_sender=yes
#-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
#-o broken_sasl_auth_clients=yes
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628      inet  n       -       n       -       -       qmqpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=

谢谢

答案1

首先,您应该检查 postfix 进程是否正在运行:

ps axu | grep master

其次,检查正在监听 25 端口的内容:

netstat -apn | grep :25

你应该得到类似的输出:

tcp 0 0 0.0.0.0:25 0.0.0.0:* 侦听 5690/主控

第三,检查 postfix 配置:

postconf | grep smtp_bind_address

它应该是空的,例如 postfix 监听所有地址:

smtp_bind_address =
smtp_bind_address6 =

四、修复以上步骤中发现的错误)

相关内容