Kaspersky Security 9.x for Microsoft Exchange Servers

Deleting addresses from the Anti-Spam address allowlist

April 2, 2024

ID 128875

Users who have been assigned the Administrator role can delete addresses from the Anti-Spam address allowlist in Windows PowerShell.

You can:

  • Delete a single record, multiple records, or all records from the address allowlist.
  • Delete the records that are present on another address allowlist (for example, one located on a different protected server) from this address allowlist.

To delete all records from the Anti-Spam address allowlist:

  1. Run Windows PowerShell (Run as Administrator) and connect the Kse.Powershell library.
  2. Run command:

    Get-KSEAntiSpamWhiteList -Server <server name> | Remove-KSEAntiSpamWhiteListItem -Server <server name>

    where <server name> is the name of the protected Microsoft Exchange server. We recommend that you specify the full address of the server in FQDN format or the IP address. If you use any profiles to manage servers, you can replace -Server <server name> with -Profile <profile name>.

All records will be deleted from the address allowlist on the server or in the profile.

You can delete one or several records from the list. To do this, select the records that you need to delete, using filtering commands (see examples).

To delete all records found in the address allowlist on Server 2 from the address allowlist on Server 1:

  1. Run Windows PowerShell (Run as Administrator) and connect the Kse.Powershell library.
  2. Run command:

    Get-KSEAntiSpamWhiteList -Server <Server 2 name> | Remove-KSEAntiSpamWhiteListItem -Server <Server 1 name>

    where:

    • <Server 1 name> is the name of the server from which you want to delete records from the address allowlist.
    • <Server 2 name> is the name of the server whose address allowlist contains records that you want to delete from the address allowlist on Server 1.

      If you use any profiles to manage servers, you can replace -Server <server name> with -Profile <profile name>.

All records that are also present on the address allowlist on Server 2 will be deleted from the address allowlist on Server 1.

You can delete one or several records from the list. To do this, select the records that you need to delete, using filtering commands (see examples).

Examples:

1. Clearing the address allowlist on server.domain.com:

Get-KSEAntiSpamWhiteList -Server server.domain.com | Remove-KSEAntiSpamWhiteListItem -Server server.domain.com

2. Deleting records found in the address allowlist of profile1 from the address allowlist of profile2:

Get-KSEAntiSpamWhiteList -Profile profile1 | Remove-KSEAntiSpamWhiteListItem -Profile profile2

3. Deleting records containing addresses ending with ".mail.com" from the address allowlist on server.domain.com:

Get-KSEAntiSpamWhiteList -Server server.domain.com | Where-Object {$_.ItemValue -like "*.mail.com"} | Remove-KSEAntiSpamWhiteListItem -Server server.domain.com

4. Deleting records containing addresses defined as an Active Directory account group from the address allowlist in profilename:

Get-KSEAntiSpamWhiteList -Profile profilename | Where-Object {$_.ItemType -eq "AdGroup"} | Remove-KSEAntiSpamWhiteListItem -Profile profilename

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.