0

我在我的 Ubuntu 18.04 机器上配置了一个带有 SSL 证书的 iRedMail 服务器,但我无法通过 SMTP/IMAP 协议连接我的设备(通过 Outlook 或 Spark)。

我打开了 593、143、993、995 端口,但设备仍然无法连接到服务器。Spark 的错误如下“无法建立与服务器的稳定连接”。我也尝试过手册中的指导,但没有运气。

来自 netstat 的日志

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp 0 0 127.0.0.53:53 0.0.0.0:\* LISTEN 644/systemd-resolve

tcp 0 0 0.0.0.0:22 0.0.0.0:\* LISTEN 907/sshd

tcp 0 0 127.0.0.1:24 0.0.0.0:\* LISTEN 804/dovecot

tcp 0 0 0.0.0.0:25 0.0.0.0:\* LISTEN 2352/master

tcp 0 0 0.0.0.0:443 0.0.0.0:\* LISTEN 969/nginx: master p

tcp 0 0 127.0.0.1:8125 0.0.0.0:\* LISTEN 2373/netdata

tcp 0 0 127.0.0.1:4190 0.0.0.0:\* LISTEN 804/dovecot

tcp 0 0 127.0.0.1:19999 0.0.0.0:\* LISTEN 2373/netdata

tcp 1 0 127.0.0.1:20000 0.0.0.0:\* LISTEN 1291/sogod

tcp 0 0 127.0.0.1:7777 0.0.0.0:\* LISTEN 1318/python2

tcp 0 0 0.0.0.0:993 0.0.0.0:\* LISTEN 804/dovecot

tcp 0 0 0.0.0.0:995 0.0.0.0:\* LISTEN 804/dovecot

tcp 0 0 127.0.0.1:10024 0.0.0.0:\* LISTEN 1871/amavisd-new (m

tcp 0 0 127.0.0.1:10025 0.0.0.0:\* LISTEN 2352/master

tcp 0 0 127.0.0.1:10026 0.0.0.0:\* LISTEN 1871/amavisd-new (m

tcp 0 0 127.0.0.1:3306 0.0.0.0:\* LISTEN 1145/mysqld

tcp 0 0 0.0.0.0:587 0.0.0.0:\* LISTEN 2352/master

tcp 0 0 127.0.0.1:10027 0.0.0.0:\* LISTEN 1871/amavisd-new (m

tcp 0 0 127.0.0.1:11211 0.0.0.0:\* LISTEN 844/memcached

tcp 0 0 127.0.0.1:10028 0.0.0.0:\* LISTEN 2352/master

tcp 0 0 127.0.0.1:9998 0.0.0.0:\* LISTEN 1871/amavisd-new (m

tcp 0 0 0.0.0.0:110 0.0.0.0:\* LISTEN 804/dovecot

tcp 0 0 127.0.0.1:7790 0.0.0.0:\* LISTEN 864/uwsgi

tcp 0 0 127.0.0.1:9999 0.0.0.0:\* LISTEN 836/php-fpm: master

tcp 0 0 0.0.0.0:143 0.0.0.0:\* LISTEN 804/dovecot

tcp 0 0 127.0.0.1:7791 0.0.0.0:\* LISTEN 866/uwsgi

tcp 0 0 0.0.0.0:80 0.0.0.0:\* LISTEN 969/nginx: master p

tcp 0 0 127.0.0.1:24242 0.0.0.0:\* LISTEN 804/dovecot

tcp 0 0 127.0.0.1:12340 0.0.0.0:\* LISTEN 804/dovecot

tcp6 0 0 :::21 :::\* LISTEN 5516/vsftpd

tcp6 0 0 :::22 :::\* LISTEN 907/sshd

tcp6 0 0 :::25 :::\* LISTEN 2352/master

tcp6 0 0 :::443 :::\* LISTEN 969/nginx: master p

tcp6 0 0 :::993 :::\* LISTEN 804/dovecot

tcp6 0 0 :::995 :::\* LISTEN 804/dovecot

tcp6 0 0 :::587 :::\* LISTEN 2352/master

tcp6 0 0 :::110 :::\* LISTEN 804/dovecot

tcp6 0 0 :::143 :::\* LISTEN 804/dovecot

tcp6 0 0 :::80 :::\* LISTEN 969/nginx: master p

**Logs from mail.log**


Feb 20 07:59:45 rod postfix/submission/smtpd\[7287\]: Anonymous TLS connection established from unknown\[52.125.141.115\]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)

Feb 20 07:59:45 rod postfix/submission/smtpd\[7282\]: disconnect from unknown\[52.125.141.115\] ehlo=2 starttls=1 auth=1 quit=1 commands=5

Feb 20 07:59:45 rod postfix/submission/smtpd\[7287\]: disconnect from unknown\[52.125.141.115\] ehlo=2 starttls=1 auth=1 quit=1 commands=5

Feb 20 07:59:50 rod postfix/postscreen\[7283\]: PASS NEW \[52.125.141.115\]:38656

Feb 20 07:59:50 rod postfix/postscreen\[7283\]: PASS OLD \[52.125.141.115\]:38660

Feb 20 07:59:50 rod postfix/smtpd\[7298\]: connect from unknown\[52.125.141.115\]

Feb 20 07:59:50 rod postfix/smtpd\[7297\]: connect from unknown\[52.125.141.115\]

Feb 20 07:59:50 rod postfix/smtpd\[7297\]: Anonymous TLS connection established from unknown\[52.125.141.115\]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)

Feb 20 07:59:50 rod postfix/smtpd\[7298\]: Anonymous TLS connection established from unknown\[52.125.141.115\]: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)

Feb 20 07:59:50 rod postfix/smtpd\[7297\]: disconnect from unknown\[52.125.141.115\] ehlo=2 starttls=1 quit=1 commands=4

Feb 20 07:59:50 rod postfix/smtpd\[7298\]: disconnect from unknown\[52.125.141.115\] ehlo=2 starttls=1 quit=1 commands=4

Feb 20 08:03:10 rod postfix/anvil\[7234\]: statistics: max connection rate 2/60s for (submission:52.125.140.5) at Feb 20 07:59:29

Feb 20 08:03:10 rod postfix/anvil\[7234\]: statistics: max connection count 2 for (submission:52.125.140.5) at Feb 20 07:59:29

Feb 20 08:03:10 rod postfix/anvil\[7234\]: statistics: max cache size 4 at Feb 20 07:59:50

Feb 20 08:06:07 rod postfix/submission/smtpd\[7443\]: connect from unknown\[52.125.140.0\]

Feb 20 08:06:07 rod postfix/submission/smtpd\[7443\]: Anonymous TLS connection established from unknown\[52.125.140.0\]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)

Feb 20 08:06:07 rod postfix/submission/smtpd\[7443\]: lost connection after STARTTLS from unknown\[52.125.140.0\]

Feb 20 08:06:07 rod postfix/submission/smtpd\[7443\]: disconnect from unknown\[52.125.140.0\] ehlo=1 starttls=1 commands=2

Feb 20 08:07:13 rod postfix/submission/smtpd\[7443\]: connect from unknown\[52.125.140.0\]

Feb 20 08:07:13 rod postfix/submission/smtpd\[7443\]: Anonymous TLS connection established from unknown\[52.125.140.0\]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)

Feb 20 08:07:13 rod postfix/submission/smtpd\[7443\]: lost connection after STARTTLS from unknown\[52.125.140.0\]

Feb 20 08:07:13 rod postfix/submission/smtpd\[7443\]: disconnect from unknown\[52.125.140.0\] ehlo=1 starttls=1 commands=2

Feb 20 08:08:09 rod postfix/postscreen\[7485\]: CONNECT from \[45.143.223.14\]:53448 to \[165.22.193.58\]:25

Feb 20 08:08:09 rod postfix/dnsblog\[7487\]: addr 45.143.223.14 listed by domain zen.spamhaus.org as 127.0.0.3

Feb 20 08:08:09 rod postfix/dnsblog\[7487\]: addr 45.143.223.14 listed by domain zen.spamhaus.org as 127.0.0.11

Feb 20 08:08:09 rod postfix/dnsblog\[7487\]: addr 45.143.223.14 listed by domain zen.spamhaus.org as 127.0.0.4

Feb 20 08:08:15 rod postfix/postscreen\[7485\]: DNSBL rank 3 for \[45.143.223.14\]:53448

Feb 20 08:08:15 rod postfix/postscreen\[7485\]: DISCONNECT \[45.143.223.14\]:53448

Feb 20 08:10:33 rod postfix/anvil\[7447\]: statistics: max connection rate 1/60s for (submission:52.125.140.0) at Feb 20 08:06:07

Feb 20 08:10:33 rod postfix/anvil\[7447\]: statistics: max connection count 1 for (submission:52.125.140.0) at Feb 20 08:06:07

Feb 20 08:10:33 rod postfix/anvil\[7447\]: statistics: max cache size 1 at Feb 20 08:06:07

Feb 20 08:48:04 rod postfix/postscreen\[8591\]: CONNECT from \[218.1.18.154\]:54420 to \[165.22.193.58\]:25

Feb 20 08:48:04 rod postfix/dnsblog\[8592\]: addr 218.1.18.154 listed by domain zen.spamhaus.org as 127.0.0.2

Feb 20 08:48:04 rod postfix/dnsblog\[8592\]: addr 218.1.18.154 listed by domain zen.spamhaus.org as 127.0.0.4

Feb 20 08:48:10 rod postfix/postscreen\[8591\]: DNSBL rank 3 for \[218.1.18.154\]:54420

Feb 20 08:48:10 rod postfix/postscreen\[8591\]: DISCONNECT \[218.1.18.154\]:54420
4

1 回答 1

0

通过以下方式修复连接

iptables -I INPUT -p tcp --dport 993 --syn -j ACCEPT
iptables -I INPUT -p tcp --dport 995 --syn -j ACCEPT

和 593 和 143 一样。,现在另一个问题:客户端同步所有文件夹,但是无法发送电子邮件 - 邮件递送单如下:

This is the mail system at host rod.psmail.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<rodnekhaev@gmail.com>: host gmail-smtp-in.l.google.com[173.194.69.27] said:
550-5.7.26 This message does not have authentication information or fails
to 550-5.7.26 pass authentication checks. To best protect our users from
spam, the 550-5.7.26 message has been blocked. Please visit 550-5.7.26
https://support.google.com/mail/answer/81126#authentication for more 550
5.7.26 information. y22si1705449edw.131 - gsmtp (in reply to end of DATA
command)
于 2020-02-20T10:23:15.753 回答