1 (edited by ming 2021-03-07 15:02:24)

Topic: How to configure the sender domain of "BANNED CONTENTS ALERT" email ?

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  1.3.2
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version:  Debian10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- 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.
====

Since my English is not very good, I may not be able to describe this problem accurately in English, and ZhangHuangbin can read Chinese, so I will describe this problem in Chinese below. Sorry for English users.


为了方便描述,下面用 example.com 表示我的邮件域,mail.example.com 表示我的服务器的主机名。

我最近发现,当外部域发送的带附件的邮件被内容过滤器(amavisd-new?)阻止时,邮件并不会立即弹回,而是显示成功发送,但是稍后该邮箱会收到一封来自 Content-filter at mail.example.com<postmaster@mail.example.com> 的主题为 BANNED contents from you (...) 的邮件,提示邮件已被阻止。

测试过程:使用 QQ 邮箱发送带有被 mail.example.com 服务器禁止的附件类型的邮件到 example.com 域下的邮件帐户,可以在 QQ 邮箱内看到该邮件的投递状态是“投递成功”,但是稍等一会儿就会收到来自 postmaster@mail.example.com 的邮件已被阻止的通知邮件。

根据我的理解,邮件传递过程应该是:外部域的邮件服务器 --> 本服务器的 postfix --> 本服务器 amavisd-new --> ...
因为外部邮件服务器只传递到 postfix,此时还没有进行内容检查,所以投递成功(直接返回了状态码 250 ),当本地的 postfix 传递到 amavisd-new 时,amavisd-new 的内容检查不通过,所以弹回了一封通知邮件。

如果我上面的理解没有问题的话,出现这个现象是很正常的。但是现在的问题是,这些通知邮件是来自类似 xxx@mail.example.com 这样的发件人,而 mail.example.com 域没有配置 spf、dkim、dmarc 记录,要是只在本地服务器上的话还好,如果是外部邮件服务器的话,来自这样的发件人的邮件很可能会被认为是垃圾邮件而被阻止。

所以我的问题是:是否可以修改这些通知邮件的发件人(包括 MAILER-DAEMON 之类的)?如果可以的话应该如何修改?或者的话,我是否应该为 mail.example.com 域也配置 spf、dkim、dmarc 记录?

谢谢!

----

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

2

Re: How to configure the sender domain of "BANNED CONTENTS ALERT" email ?

ming wrote:

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  1.3.2
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version:  Debian10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- 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.
====

Since my English is not very good, I may not be able to describe this problem accurately in English, and ZhangHuangbin can read Chinese, so I will describe this problem in Chinese below. Sorry for English users.

使用在线服务(例如Google Translate)可以帮助您更好地解决问题。

3

Re: How to configure the sender domain of "BANNED CONTENTS ALERT" email ?

- 直接发中文帖子没问题的。我是胡建人。:D
- 你理解的邮件进站流程没错。
- 建议是直接给 mail.example.com 主机名加 A、MX、SPF、DKIM 记录,完事。:)

4

Re: How to configure the sender domain of "BANNED CONTENTS ALERT" email ?

ZhangHuangbin wrote:

- 直接发中文帖子没问题的。我是胡建人。:D
- 你理解的邮件进站流程没错。
- 建议是直接给 mail.example.com 主机名加 A、MX、SPF、DKIM 记录,完事。:)

好的,我去看看给主机名也加上这些 DNS 记录,谢谢了。