Postfix,无法通过 telnet 连接

Postfix,无法通过 telnet 连接

大家好,设置 Postfix + Dovecot + OpenSSL 后,我无法连接到我的 smtp 主机名,也无法连接到来自同一服务器的本地主机。

[root@reputation ~]# telnet reputation.host 25
Trying fe80::dad3:85ff:fe5c:e942%enp5s0f0...
telnet: connect to address fe80::dad3:85ff:fe5c:e942%enp5s0f0: Connection refused
Trying 104.219.235.10...
telnet: connect to address 104.219.235.10: Connection refused

我也尝试了端口 25、465、587,出现同样的错误

这里还有 netstat -pln

[root@reputation ~]# netstat -pln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:587           0.0.0.0:*               LISTEN      9020/master
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      9055/dovecot
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      9055/dovecot
tcp        0      0 127.0.0.1:465           0.0.0.0:*               LISTEN      9020/master
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      2171/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      999/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      9020/master
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      2171/named
tcp        0      0 127.0.0.1:8891          0.0.0.0:*               LISTEN      1648/opendkim
tcp        0      0 127.0.0.1:8893          0.0.0.0:*               LISTEN      1996/opendmarc
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      9055/dovecot
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      9055/dovecot
tcp6       0      0 ::1:587                 :::*                    LISTEN      9020/master
tcp6       0      0 :::110                  :::*                    LISTEN      9055/dovecot
tcp6       0      0 :::143                  :::*                    LISTEN      9055/dovecot
tcp6       0      0 :::80                   :::*                    LISTEN      2719/httpd
tcp6       0      0 ::1:465                 :::*                    LISTEN      9020/master
tcp6       0      0 ::1:53                  :::*                    LISTEN      2171/named
tcp6       0      0 :::22                   :::*                    LISTEN      999/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      9020/master
tcp6       0      0 ::1:953                 :::*                    LISTEN      2171/named
tcp6       0      0 :::993                  :::*                    LISTEN      9055/dovecot
tcp6       0      0 :::995                  :::*                    LISTEN      9055/dovecot
udp        0      0 127.0.0.1:53            0.0.0.0:*                           2171/named
udp6       0      0 ::1:53                  :::*                                2171/named
raw6       0      0 :::58                   :::*                    7           787/NetworkManager
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name     Path
unix  2      [ ACC ]     STREAM     LISTENING     105781   9020/master          public/cleanup
unix  2      [ ACC ]     STREAM     LISTENING     105784   9020/master          public/qmgr
unix  2      [ ACC ]     STREAM     LISTENING     105788   9020/master          private/tlsmgr
unix  2      [ ACC ]     STREAM     LISTENING     105791   9020/master          private/rewrite
unix  2      [ ACC ]     STREAM     LISTENING     105794   9020/master          private/bounce
unix  2      [ ACC ]     STREAM     LISTENING     105797   9020/master          private/defer
unix  2      [ ACC ]     STREAM     LISTENING     105800   9020/master          private/trace
unix  2      [ ACC ]     STREAM     LISTENING     105803   9020/master          private/verify
unix  2      [ ACC ]     STREAM     LISTENING     105806   9020/master          public/flush
unix  2      [ ACC ]     STREAM     LISTENING     105809   9020/master          private/proxymap
unix  2      [ ACC ]     STREAM     LISTENING     105812   9020/master          private/proxywrite
unix  2      [ ACC ]     STREAM     LISTENING     105815   9020/master          private/smtp
unix  2      [ ACC ]     STREAM     LISTENING     105818   9020/master          private/relay
unix  2      [ ACC ]     STREAM     LISTENING     105821   9020/master          public/showq
unix  2      [ ACC ]     STREAM     LISTENING     105824   9020/master          private/error
unix  2      [ ACC ]     STREAM     LISTENING     105827   9020/master          private/retry
unix  2      [ ACC ]     STREAM     LISTENING     105830   9020/master          private/discard
unix  2      [ ACC ]     STREAM     LISTENING     105833   9020/master          private/local
unix  2      [ ACC ]     STREAM     LISTENING     105836   9020/master          private/virtual
unix  2      [ ACC ]     STREAM     LISTENING     105839   9020/master          private/lmtp
unix  2      [ ACC ]     STREAM     LISTENING     105842   9020/master          private/anvil
unix  2      [ ACC ]     STREAM     LISTENING     105845   9020/master          private/scache
unix  2      [ ACC ]     STREAM     LISTENING     2952     1/systemd            /run/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     80270    5447/saslauthd       /run/saslauthd/mux
unix  2      [ ACC ]     STREAM     LISTENING     2987     1/systemd            /run/lvm/lvmetad.socket
unix  2      [ ACC ]     STREAM     LISTENING     2479     1/systemd            /run/systemd/journal/stdout
unix  2      [ ACC ]     STREAM     LISTENING     105912   9055/dovecot         /var/run/dovecot/stats
unix  2      [ ACC ]     STREAM     LISTENING     105915   9055/dovecot         /var/run/dovecot/ssl-params
unix  2      [ ACC ]     STREAM     LISTENING     105917   9055/dovecot         /var/run/dovecot/login/ssl-params
unix  2      [ ACC ]     STREAM     LISTENING     105919   9055/dovecot         /var/run/dovecot/replicator
unix  2      [ ACC ]     STREAM     LISTENING     105921   9055/dovecot         /var/run/dovecot/replication-notify
unix  2      [ ACC ]     STREAM     LISTENING     105924   9055/dovecot         /var/run/dovecot/login/pop3
unix  2      [ ACC ]     STREAM     LISTENING     14531    1/systemd            /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     105930   9055/dovecot         /var/run/dovecot/log-errors
unix  2      [ ACC ]     STREAM     LISTENING     105932   9055/dovecot         /var/run/dovecot/lmtp
unix  2      [ ACC ]     STREAM     LISTENING     105934   9055/dovecot         /var/run/dovecot/ipc
unix  2      [ ACC ]     STREAM     LISTENING     105936   9055/dovecot         /var/run/dovecot/login/ipc-proxy
unix  2      [ ACC ]     STREAM     LISTENING     105938   9055/dovecot         /var/run/dovecot/indexer-worker
unix  2      [ ACC ]     STREAM     LISTENING     105940   9055/dovecot         /var/run/dovecot/indexer
unix  2      [ ACC ]     STREAM     LISTENING     105942   9055/dovecot         /var/run/dovecot/login/imap
unix  2      [ ACC ]     STREAM     LISTENING     105944   9055/dovecot         /var/run/dovecot/imap-urlauth-worker
unix  2      [ ACC ]     STREAM     LISTENING     105946   9055/dovecot         /var/run/dovecot/token-login/imap-urlauth
unix  2      [ ACC ]     STREAM     LISTENING     105948   9055/dovecot         /var/run/dovecot/imap-urlauth
unix  2      [ ACC ]     STREAM     LISTENING     105954   9055/dovecot         /var/run/dovecot/doveadm-server
unix  2      [ ACC ]     STREAM     LISTENING     105956   9055/dovecot         /var/run/dovecot/dns-client
unix  2      [ ACC ]     STREAM     LISTENING     105958   9055/dovecot         /var/run/dovecot/director-admin
unix  2      [ ACC ]     SEQPACKET  LISTENING     3047     1/systemd            /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     105960   9055/dovecot         /var/run/dovecot/director-userdb
unix  2      [ ACC ]     STREAM     LISTENING     3049     1/systemd            /run/lvm/lvmpolld.socket
unix  2      [ ACC ]     STREAM     LISTENING     105962   9055/dovecot         /var/run/dovecot/dict
unix  2      [ ACC ]     STREAM     LISTENING     105777   9020/master          public/pickup
unix  2      [ ACC ]     STREAM     LISTENING     105964   9055/dovecot         /var/run/dovecot/config
unix  2      [ ACC ]     STREAM     LISTENING     105966   9055/dovecot         /var/run/dovecot/login/login
unix  2      [ ACC ]     STREAM     LISTENING     105968   9055/dovecot         /var/run/dovecot/token-login/tokenlogin
unix  2      [ ACC ]     STREAM     LISTENING     105970   9055/dovecot         /var/run/dovecot/auth-login
unix  2      [ ACC ]     STREAM     LISTENING     105972   9055/dovecot         /var/run/dovecot/auth-client
unix  2      [ ACC ]     STREAM     LISTENING     105974   9055/dovecot         /var/run/dovecot/auth-userdb
unix  2      [ ACC ]     STREAM     LISTENING     105976   9055/dovecot         /var/run/dovecot/auth-master
unix  2      [ ACC ]     STREAM     LISTENING     105978   9055/dovecot         /var/run/dovecot/auth-worker
unix  2      [ ACC ]     STREAM     LISTENING     105980   9055/dovecot         /var/run/dovecot/anvil
unix  2      [ ACC ]     STREAM     LISTENING     105982   9055/dovecot         /var/run/dovecot/anvil-auth-penalty

这是 postfix conf 文件

主配置文件

https://pastebin.com/raw/R23ijppP

抱歉,外部链接

主配置文件

https://pastebin.com/raw/G4eHvr0B

另外,我正在努力解决,但找不到为什么会发生这种情况的原因,我错在哪里,这是我第二次尝试设置它。

此外,我希望该邮件服务器可以通过客户端 PC 邮件程序(如 gammadyne、maxbulk mailers)访问。这是我的促销邮件服务器

我希望有人能帮助我

提前致谢

答案1

禁用“仅监听环回” Postfix 配置

您的 postfix 配置为仅在 loopback/localhost 接口上接受传入的 tcp (smtp) 连接。在大多数“单用户”计算机上,将其作为默认设置是合理的。

更改inet_interfaces配置设置来改变它。


您的master.cf文件

# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on.  By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_interfaces = localhost

相关内容