如何防止使用我的内部接受域的外部欺骗电子邮件

如何防止使用我的内部接受域的外部欺骗电子邮件

我收到了从我自己的域发送到我自己的域的垃圾邮件。我正在使用 Exchange 2013。

例子:

[电子邮件保护]被用于发送垃圾邮件[电子邮件保护]

我可以通过从任何外部 IP 远程登录到服务器来成功复制该问题。

telnet <external-ip-of-server> 25
helo anydomain.com
250 myserver.mydomain.com Hello [External-IP]
mail from:[email protected]
250 2.1.0 Sender OK
rcpt to:[email protected]
250 2.1.5 Recipient OK
data
354 Start mail input; end with <CRLF>.<CRLF>
some text here
.
250 2.6.0 <[email protected]> [InternalId=20890720927751, Hostname=myserver.mydomain.com] Queued mail for delivery

我有一个如下的 SPF 记录设置:v=spf1 ip4:External.IP.of.MyServer -all

我还在 Exchange 2013 服务器上启用了 SenderID,如下所示:

[PS] C:\Windows\system32>get-senderidconfig | fl


RunspaceId            : 9be45249-1186-42b4-9e4e-3bc5a56c0c63
SpoofedDomainAction   : Reject
TempErrorAction       : StampStatus
BypassedRecipients    : {}
BypassedSenderDomains : {}
Name                  : SenderIdConfig
Enabled               : True
ExternalMailEnabled   : True
InternalMailEnabled   : False
AdminDisplayName      :
ExchangeVersion       : 0.1 (8.0.535.0)
DistinguishedName     : CN=SenderIdConfig,CN=Message Hygiene,CN=Transport Settings,CN=MyOrganization,CN=Microsoft Exchange,CN=S
                        ervices,CN=Configuration,DC=mydomain,DC=com
Identity              : SenderIdConfig
Guid                  : e85c9acb-579e-4d92-bde7-03ac2dd9beac
ObjectCategory        : mydomain.com/Configuration/Schema/ms-Exch-Message-Hygiene-Sender-ID-Config
ObjectClass           : {top, msExchAgent, msExchMessageHygieneSenderIDConfig}
WhenChanged           : 2015-12-08 10:23:24
WhenCreated           : 2014-02-15 13:37:30
WhenChangedUTC        : 2015-12-08 09:23:24
WhenCreatedUTC        : 2014-02-15 12:37:30
OrganizationId        :
Id                    : SenderIdConfig
OriginatingServer     : mydc.mydomain.com
IsValid               : True
ObjectState           : Unchanged

在不使用任何外部反垃圾邮件服务的情况下,如何防止此类垃圾邮件?

答案1

您需要通过运行以下命令来删除绕过发件人地址欺骗检查的权限:

Get-ReceiveConnector "name of the internet receive connector" | Get-ADPermission -user "NT AUTHORITY\Anonymous Logon" | where {$_.ExtendedRights -like "ms-exch-smtp-accept-authoritative-domain-sender"} | Remove-ADPermission

如果这不能解决问题(例如对于 Exchange 2013 CU5+),您应该执行以下操作:

  1. 使用以下方式阻止您自己的域名

    Set-SenderFilterConfig -BlockedDomains mydomain.com

    Set-SenderFilterConfig -InternalMailEnabled $true

  2. 删除匿名用户的 ms-Exch-SMTP-Accept-Any-Sender

    Get-ReceiveConnector "name of the internet receive connector" | Get-ADPermission -user "NT AUTHORITY\Anonymous Logon" | where {$_.ExtendedRights -like "ms-Exch-SMTP-Accept-Any-Sender"} | Remove-ADPermission

  3. 允许从 LAN 进行开放中继(如果需要):

    Get-ReceiveConnector "name of your LAN Open Relay connector" | add-ADPermission -user "NT AUTHORITY\Anonymous Logon" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Sender"

PS 确保在执行这些操作后重新启动传输服务。

相关内容