大网数据广告活动
服务器运维问答

How do I enable recipient verification in Exchange?

· 52CE 我爱测

My problem basically boils down to this: Exchange (2016) is accepting mail for non-existent addresses and then later sending out DSNs (delivery status notification) to notify the sender of failure. I want it to instead immediatel…

问题原文

原帖链接 · Chris L · CC BY-SA 3.0

My problem basically boils down to this: Exchange (2016) is accepting mail for non-existent addresses and then later sending out DSNs (delivery status notification) to notify the sender of failure. I want it to instead immediately reject mail sent to non-existent addresses with a 550 response.

More background

My setup looks roughly like this:

                                                 +-----+
                  Datacenter          Office     |User1|
+----------+      +---------+      +----------+  +-----+  +-----+
| Internet | <--> | Postfix | <--> | Exchange |           |UserN|
+----------+      +---------+      +----------+  +-----+  +-----+
                                                 |User2|
                                                 +-----+

Incoming mail hits my postfix server first, which does virus scanning, spam filtering and quarantine. It then gets forwarded on to our office Exchange server.

Postfix is configured to do recipient verification against the exchange server. This involves connecting to the server and performing a partial SMTP transaction, up to the RCPT TO command. If the server responds with code 250 then the recipient is considered valid.

The problem is that Exchange is always responding with 250... it apparently does not even attempt to do any validation upon receiving the RCPT TO command.

I have followed the instructions on technet for enabling the anti-spam functionality and recipient validation in Exchange, but I have no idea what it did, because the behavior of Exchange's SMTP server is exactly the same as it was before I did anything.

Here are the commands I have run on the Exchange server trying to get this working.

& $env:ExchangeInstallPath\Scripts\Install-AntiSpamAgents.ps1
Restart-Service MSExchangeTransport

Set-RecipientFilterConfig -Enabled $true
Set-RecipientFilterConfig -RecipientValidationEnabled $true

Is Exchange's recipient validation supposed to make it perform immediate validation upon receiving RCPT TO? (And if not, what exactly does it do?)

已采纳解答

原帖链接 · Chris L · CC BY-SA 3.0

This question is similar, and its accepted answer worked for me.

For recipient validation to be done right after the RCPT TO command, you have to be connected to a Hub Transport (as opposed to a Frontend Transport). I edited an existing Hub Transport bound to port 2525, checking the box to allow "Anonymous users" to connect to it (make sure to lock this down by some other means, so only known servers can access it).

Then I changed the settings on my gateway (postfix) server to use port 2525 when communicating with this exchange server. At this point the recipient validation started working as intended.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-04-21)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。