PowerShell 指令繞過 Office 365 垃圾郵件過濾器

PowerShell 指令繞過 Office 365 垃圾郵件過濾器

我希望建立一個 Office 365 傳輸規則,以允許來自選定 IP 位址的入站電子郵件繞過垃圾郵件過濾器。

有人可以幫忙嗎?

我能想到的最接近的是:

Set-TransportRule -Name「白名單」-ExceptIfSenderIpRanges {1.1.1.1,2.2.2.2,3.3.3.3,4.4.4.4} -SetSCL -1

感謝您的幫忙!

答案1

CSV 檔案:

在此輸入影像描述

cmdlet:

$IPs = Import-Csv C:\root\IP.CSV
$IpRange =$IPs.IP
Get-TransportRule  <Rule Name> | Set-TransportRule -ExceptIfSenderIpRanges $IPRange
Get-TransportRule  <Rule Name>  |fl  ExceptIfSenderIpRanges

如下圖: 在此輸入影像描述

答案2

$UserCredential = Get-Credential
Set-ExecutionPolicy RemoteSigned
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Get-Mailbox
Get-Mailbox | Set-MailboxJunkEmailConfiguration –Enabled $False

答案3

我們可以這樣做內容過濾設定或者運輸規則。供你參考:如何在 Exchange 2013、2016 或 Office 365 中按 IP 位址列入白名單

相關內容