顯示具有 Exchange 標籤的文章。 顯示所有文章
顯示具有 Exchange 標籤的文章。 顯示所有文章

2016年5月8日 星期日

Exchange Server 2013 AntiSpam

安裝反垃圾郵件防護功能

Exchange Server 2013的命令控台之後,下達命令「& $env:ExchangeInstallPath\Scripts\Install-AntiSpamAgents.ps1」

設定SMTP SERVER IP

Set-TransportConfig -InternalSMTPServers @{Add="192.168.1.xx"}


Get-TransportAgent

查看寄件者設定

Get-SenderIDConfig
查看寄件者識別碼篩選功能設定
Get-SenderIDConfig | Format-List Enabled

查看寄件者篩選器
Get-SenderFilterConfig | Format-List Enabled
鎖發件人為空白的郵件
Set-SenderFilterConfig -BlankSenderBlockingEnabled $true

查看目前的三種寄件者封鎖清單

Get-SenderFilterConfig | Format-List BlockedSenders,BlockedDomains,BlockedDomainsAndASubdomains
查看目前的收件者封鎖清單
Get-RecipientFilterConfig | Format-List BlockedRecipients
封鎖送至組織中不存在之收件者的郵件
Set-RecipientFilterConfig -RecipientValidationEnabled $true

查詢寄件者識別碼目前啟用狀態
Get-SenderIDConfig
Get-SenderIDConfig | Format-List SpoofedDomainAction

Set-SenderIDConfig -SpoofedDomainAction Reject


最後,若想要針對特定的寄件者或網域忽略寄件者識別碼的檢查(例如)
Set-SenderIDConfig -BypassedRecipients jerrys@contoso.com,landy@contoso.com -BypassedSenderDomains msn.com

2016年3月13日 星期日

Exchange 2013 設定SPAM List


在沒有邊際傳輸伺服器(Forefront Protection)的情形下,
Exchange Mail Server的角色並無法檢視與過濾垃圾或有害郵件

但還是可以透過SPAM List 的設定來過濾與拒絕高風險伺服器發出的郵件
※當然,如果是自家內部發出的就GG了

設定方式如下:
 ※溫馨小提醒,在做任何變更前必先存檔
開啟Exchange 命令介面(別開成2012 Power Shell)

開啟連結拒絕清單
安裝TransportAgent

Install-TransportAgent -Name "Connection Filtering Agent" -TransportService FrontEnd -TransportAgentFactory "Microsoft.Exchange.Transport.Agent.ConnectionFiltering.ConnectionFilteringAgentFactory" -AssemblyPath "C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\agents\Hygiene\Microsoft.Exchange.Transport.Agent.Hygiene.dll"

開啟服務

Enable-TransportAgent -TransportService FrontEnd -Identity "Connection Filtering Agent"
重啟
Exchange Transport Service

查看狀態
Get-TransportAgent -TransportService FrontEnd


====================
加入SPAM List名稱


Add-IPBlockListProvider -Name SpamhausSBL -LookupDomain sbl.spamhaus.org -AnyMatch $true -Enabled $true -RejectionResponse "IP address is listed by Spamhaus"
Add-IPBlockListProvider -Name SpamhausXBL -LookupDomain xbl.spamhaus.org -AnyMatch $true -Enabled $true -RejectionResponse "IP address is listed by Spamhaus"
Add-IPBlockListProvider -Name SpamhausPBL -LookupDomain pbl.spamhaus.org -AnyMatch $true -Enabled $true -RejectionResponse "IP address is listed by Spamhaus"
Add-IPBlockListProvider -Name SpamhausSBL+XBL -LookupDomain sbl-xbl.spamhaus.org -AnyMatch $true -Enabled $true -RejectionResponse "IP address is listed by Spamhaus"
Add-IPBlockListProvider -Name SpamhausZEN -LookupDomain zen.spamhaus.org -AnyMatch $true -Enabled $true -RejectionResponse "IP address is listed by Spamhaus"


===
Get-IPBLOCKLISTPROVIDER
===


設定完畢 ,加入SPAM List IP
====
Set-IPBlockListProvider "SpamhausZEN" -IPAddressesMatch @{Add="127.0.0.2","127.0.0.4","127.0.0.5","127.0.0.6","127.0.0.7","127.0.0.8","127.0.0.10","127.0.0.11"}
Set-IPBlockListProvider "SpamhausSBL" -IPAddressesMatch @{Add="127.0.0.2"}
Set-IPBlockListProvider "SpamhausXBL" -IPAddressesMatch @{Add="127.0.0.4","127.0.0.5","127.0.0.6","127.0.0.7","127.0.0.8"}
Set-IPBlockListProvider "SpamhausPBL" -IPAddressesMatch @{Add="127.0.0.10","127.0.0.11"}
Set-IPBlockListProvider "SpamhausSBL+XBL" -IPAddressesMatch @{Add="127.0.0.2","127.0.0.3","127.0.0.4","127.0.0.5","127.0.0.6","127.0.0.7","127.0.0.8"}
====
完成

===
※移除 SPAM List 設定
Remove-IPBlockListProvider -Name Spamhaus -LookupDomain zen.spamhaus.org -AnyMatch $true -Enabled $true -RejectionResponse "IP address is listed by Spamhaus"