无法从客户端连接到 Postfix

无法从客户端连接到 Postfix

我正在尝试设置 Postfix、Dovecot、Spamassassin 电子邮件堆栈并安装和配置所有内容。

但是,每次我尝试使用客户端连接到服务器时,它都无法连接到发送服务器(配置接收服务器没有问题)。我尝试使用 Thunderbird(在我的 PC 上)和 Bluemail(在我的手机上)。

mail.log当我尝试连接到传出服务器时显示两行:

Aug 11 12:39:07 pyrosoftsolutions postfix/smtpd[13039]: lost connection after EHLO from 60.216.208.46.dyn.plus.net[46.208.216.60]
Aug 11 12:39:07 pyrosoftsolutions postfix/smtpd[13039]: disconnect from 60.216.208.46.dyn.plus.net[46.208.216.60] ehlo=1 commands=1

我尝试过使用和不使用身份验证来连接端口 587。

我的 netstat 显示 postfix 确实正在监听正确的端口:

root@pyrosoftsolutions:/home/james# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1489/sshd
tcp        0      0 0.0.0.0:3128            0.0.0.0:*               LISTEN      1090/(squid-1)
tcp        0      0 0.0.0.0:39001           0.0.0.0:*               LISTEN      2190/flarecoind
tcp        0      0 127.0.0.1:39002         0.0.0.0:*               LISTEN      2190/flarecoind
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      1876/nginx: master
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1545/dovecot
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1505/mysqld
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      1862/master
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      1350/systemd-resolv
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1876/nginx: master
tcp6       0      0 :::22                   :::*                    LISTEN      1489/sshd
tcp6       0      0 :::3000                 :::*                    LISTEN      2192/gitea
tcp6       0      0 :::443                  :::*                    LISTEN      1876/nginx: master
tcp6       0      0 :::993                  :::*                    LISTEN      1545/dovecot
tcp6       0      0 :::587                  :::*                    LISTEN      1862/master
tcp6       0      0 :::5355                 :::*                    LISTEN      1350/systemd-resolv
tcp6       0      0 :::80                   :::*                    LISTEN      1876/nginx: master

这是我的master.cf文件:

smtp      inet  n       -       n       -       -       smtpd
submission inet n       -       y       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
pickup    unix  n       -       y       60      1       pickup
cleanup   unix  n       -       y       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       y       1000?   1       tlsmgr
rewrite   unix  -       -       y       -       -       trivial-rewrite
bounce    unix  -       -       y       -       0       bounce
defer     unix  -       -       y       -       0       bounce
trace     unix  -       -       y       -       0       bounce
verify    unix  -       -       y       -       1       verify
flush     unix  n       -       y       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       y       -       -       smtp
relay     unix  -       -       y       -       -       smtp
showq     unix  n       -       y       -       -       showq
error     unix  -       -       y       -       -       error
retry     unix  -       -       y       -       -       error
discard   unix  -       -       y       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       y       -       -       smtp
anvil     unix  -       -       y       -       1       anvil
scache    unix  -       -       y       -       1       scache
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix  -       n       n       -       2       pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

和我的ufw status verbose

root@pyrosoftsolutions:/home/james# ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
80                         ALLOW IN    Anywhere
443                        ALLOW IN    Anywhere
22                         ALLOW IN    Anywhere
39001                      ALLOW IN    Anywhere
39002                      ALLOW IN    Anywhere
3128                       ALLOW IN    Anywhere
22/tcp                     ALLOW IN    Anywhere
25/tcp (Postfix)           ALLOW IN    Anywhere
3000                       ALLOW IN    Anywhere
587                        ALLOW IN    Anywhere
25                         ALLOW IN    Anywhere
2048,3128,3130,3401,4827/tcp (Squid) ALLOW IN    Anywhere
993                        ALLOW IN    Anywhere
995                        ALLOW IN    Anywhere
465                        ALLOW IN    Anywhere
80 (v6)                    ALLOW IN    Anywhere (v6)
443 (v6)                   ALLOW IN    Anywhere (v6)
22 (v6)                    ALLOW IN    Anywhere (v6)
39001 (v6)                 ALLOW IN    Anywhere (v6)
39002 (v6)                 ALLOW IN    Anywhere (v6)
3128 (v6)                  ALLOW IN    Anywhere (v6)
22/tcp (v6)                ALLOW IN    Anywhere (v6)
25/tcp (Postfix (v6))      ALLOW IN    Anywhere (v6)
3000 (v6)                  ALLOW IN    Anywhere (v6)
587 (v6)                   ALLOW IN    Anywhere (v6)
25 (v6)                    ALLOW IN    Anywhere (v6)
2048,3128,3130,3401,4827/tcp (Squid (v6)) ALLOW IN    Anywhere (v6)
993 (v6)                   ALLOW IN    Anywhere (v6)
995 (v6)                   ALLOW IN    Anywhere (v6)
465 (v6)                   ALLOW IN    Anywhere (v6)

然而,奇怪的是,我可以telnet在内部和外部移植 587,没有任何问题。

有什么建议吗?

相关内容