1 (edited by yshzhao 2023-02-02 10:40:20)

Topic: 邮箱内部互相发邮件,发送方提示发送成功,接收方收不到

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  iRedMail-1.6.2
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Ubuntu 20.04.3 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

在相同的邮件域下,一个账号给另一个账号发送邮件,尝试多次都无法成功收到,但内部的其他人之间是可以正常发送邮件的。
查看了/var/log/iredapd/下的iredapd.log文件,显示的日志如下:

Feb  1 00:57:14 mail iredapd [127.0.0.1] RCPT, 1.jia@*.com => 2.yang@*.com, DUNNO [sasl_username=1.jia@*.com, sender=1.jia@*.com, client_name=mail.*.com, reverse_client_name=mail.*.com, helo=localhost, encryption_protocol=TLSv1.3, encryption_cipher=TLS_AES_256_GCM_SHA384, server_port=587, process_time=0.0202s]
Feb  1 00:57:14 mail iredapd [127.0.0.1] END-OF-MESSAGE, 1.jia@*.com => 2.yang@*.com, DUNNO [recipient_count=1, size=3041606, process_time=0.0149s]

查看了数据库日志,有很多could not receive data from client: Connection reset by peer的日志:

2023-02-01 01:08:30.083 UTC [3960235] vmailadmin@vmail LOG:  could not receive data from client: Connection reset by peer
2023-02-01 01:08:30.083 UTC [3960234] vmailadmin@vmail LOG:  could not receive data from client: Connection reset by peer
2023-02-01 01:08:30.083 UTC [3960233] vmailadmin@vmail LOG:  could not receive data from client: Connection reset by peer
2023-02-01 01:20:24.479 UTC [3963681] vmailadmin@vmail LOG:  could not receive data from client: Connection reset by peer
2023-02-01 01:20:24.479 UTC [3963680] vmailadmin@vmail LOG:  could not receive data from client: Connection reset by peer
2023-02-01 01:20:24.479 UTC [3963059] vmail@vmail LOG:  could not receive data from client: Connection reset by peer
2023-02-01 01:20:24.479 UTC [3963058] vmail@vmail LOG:  could not receive data from client: Connection reset by peer

查看了dovecot的日志,有很多的报错信息:
Feb  1 01:06:52 mail dovecot: auth: Warning: sqlpool(pgsql): Query failed, retrying: FATAL:  terminating connection due to administrator command
Feb  1 01:06:52 mail dovecot: auth: Error: sqlpool(pgsql): Query failed, aborting: SELECT mailbox.password, mailbox.allow_nets FROM mailbox,domain WHERE mailbox.username='2.yang@*.com' AND mailbox."enableimaptls"=1 AND mailbox.active=1 AND mailbox.domain=domain.domain AND domain.backupmx=0 AND domain.active=1
Feb  1 01:06:52 mail dovecot: auth: Error: sql(2.yang@*.com,172.16.2.20,<Wm1LEJnzIXasEAIU>): Password query failed: FATAL:  terminating connection due to administrator command
Feb  1 01:06:59 mail dovecot: auth: Error: pgsql(127.0.0.1): Connect failed to database vmail: could not connect to server: Connection refused
Feb  1 01:06:59 mail dovecot: auth: Error: #011Is the server running on host "127.0.0.1" and accepting
Feb  1 01:06:59 mail dovecot: auth: Error: #011TCP/IP connections on port 5432? (state: connecting)
Feb  1 01:06:59 mail dovecot: auth: Error: pgsql(127.0.0.1): Connect failed to database vmail: could not connect to server: Connection refused
Feb  1 01:06:59 mail dovecot: auth: Error: #011Is the server running on host "127.0.0.1" and accepting
Feb  1 01:06:59 mail dovecot: auth: Error: #011TCP/IP connections on port 5432? (state: connecting)
Feb  1 01:06:59 mail dovecot: auth: Error: pgsql(127.0.0.1): Connect failed to database vmail: could not connect to server: Connection refused

期间我在网上搜索了一些解决方案,做了一次apt-get upgrade,不确定其中的部分数据库报错是否与此有关。

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: 邮箱内部互相发邮件,发送方提示发送成功,接收方收不到

- PostgreSQL 服务器没启动?
- 不要在公开的论坛里泄露实际的邮件地址,否则可能招来垃圾邮件(网络爬虫收集邮件地址后群发)。

3 (edited by yshzhao 2023-02-02 10:41:58)

Re: 邮箱内部互相发邮件,发送方提示发送成功,接收方收不到

ZhangHuangbin wrote:

- PostgreSQL 服务器没启动?
- 不要在公开的论坛里泄露实际的邮件地址,否则可能招来垃圾邮件(网络爬虫收集邮件地址后群发)。

postgreSQL是启动了的,对外收发邮件都正常,目前就发现这两个账户之间发邮件出问题
另外感谢提醒,我把其中涉及到邮件地址的内容替换了一下

4

Re: 邮箱内部互相发邮件,发送方提示发送成功,接收方收不到

现在仍然无法发送吗?每次发送的时候 Postfix 的完整 log 是啥?

5

Re: 邮箱内部互相发邮件,发送方提示发送成功,接收方收不到

ZhangHuangbin wrote:

现在仍然无法发送吗?每次发送的时候 Postfix 的完整 log 是啥?

在/var/log目录下的mail.log文件中找到了下述的日志,不知道是不是你需要的日志信息,我看里面好像是把exe类型的附件给屏蔽了,这个是在哪里配置呢?

Feb  6 01:45:11 mail postfix/10025/smtpd[288998]: connect from mail.*.com[127.0.0.1]
Feb  6 01:45:11 mail postfix/10025/smtpd[288998]: 4P98GH1yl6zWgT5: client=mail.*.com[127.0.0.1]
Feb  6 01:45:11 mail postfix/cleanup[288973]: 4P98GH1yl6zWgT5: message-id=<VAbBZk6wDpKvRc@mail.*.com>
Feb  6 01:45:11 mail postfix/10025/smtpd[288998]: disconnect from mail.*.com[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Feb  6 01:45:11 mail postfix/qmgr[562532]: 4P98GH1yl6zWgT5: from=<postmaster@mail.*.com>, size=2988, nrcpt=1 (queue active)
Feb  6 01:45:11 mail amavis[119044]: (119044-01) Blocked BANNED (.exe,.exe-ms,IS32U512A.exe) {DiscardedInternal,Quarantined}, ORIGINATING/MYNETS LOCAL [127.0.0.1]:56502 ESMTP/ESMTP <*.jia@*.com> -> <*.yang@*.com>, (), quarantine: bBZk6wDpKvRc, Queue-ID: 4P98Fy40HrzWgT4, Message-ID: <009e1b189d18650cf9841598e2856e97@*.com>, mail_id: bBZk6wDpKvRc, b: 1KA_rIypN, Hits: -, size: 4450146, Subject: "UKEY LICENSEç<9b>¸å<85>³æ<96><87>件 (raw: =?UTF-8?Q?UKEY_LICENSE=E7=9B=B8=E5=85=B3=E6=96=87=E4=BB=B6?=)", From: <*.jia@*.com>, User-Agent: Roundcube_Webmail, helo=localhost, b.key=(?^:^\\.(exe-ms|dll)$), b.com=(?^:^\\.(exe-ms|dll)$), b.rhs=1, b.parts=P=p003,L=1,M=multipart/mixed | P=p002,L=1/2,M=application/zip,T=zip,N=To_*.zip | P=p010,L=1/2/7,T=exe,T=exe-ms,N=IS32U512A.exe, P=p003,L=1,M=multipart/mixed | P=p002,L=1/2,M=application/zip,T=zip,N=To_*.zip | P=p012,L=1/2/9,T=exe,T=exe-ms,N=HexAndStrConverDll.dll, ..., 16622 ms
Feb  6 01:45:11 mail postfix/cleanup[289000]: 4P98GH2WczzWgT7: message-id=<VAbBZk6wDpKvRc@mail.*.com>
Feb  6 01:45:11 mail postfix/amavis/smtp[288989]: 4P98Fy40HrzWgT4: to=<*.yang@*.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=17, delays=0.18/0/0.01/17, dsn=2.7.0, status=sent (250 2.7.0 Ok, discarded, id=119044-01 - BANNED: .exe,.exe-ms,IS32U512A.exe)
Feb  6 01:45:11 mail postfix/qmgr[562532]: 4P98Fy40HrzWgT4: removed
Feb  6 01:45:11 mail postfix/local[289580]: 4P98GH1yl6zWgT5: to=<root@mail.*.com>, relay=local, delay=0.15, delays=0.07/0.01/0/0.08, dsn=2.0.0, status=sent (forwarded as 4P98GH2WczzWgT7)
Feb  6 01:45:11 mail postfix/qmgr[562532]: 4P98GH2WczzWgT7: from=<postmaster@mail.*.com>, size=3126, nrcpt=1 (queue active)
Feb  6 01:45:11 mail postfix/qmgr[562532]: 4P98GH1yl6zWgT5: removed
Feb  6 01:45:11 mail postfix/pipe[289001]: 4P98GH2WczzWgT7: to=<postmaster@*.com>, orig_to=<root@mail.*.com>, relay=dovecot, delay=0.25, delays=0.07/0/0/0.18, dsn=2.0.0, status=sent (delivered via dovecot service)
Feb  6 01:45:11 mail postfix/qmgr[562532]: 4P98GH2WczzWgT7: removed