Adding addresses to the Anti-Spam address denylist

Users who have been assigned the Administrator role can add addresses to the Anti-Spam address denylist in Windows PowerShell.

You can:

To add a record to the Anti-Spam address denylist:

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

    Add-KSEAntiSpamBlackList -Server <server name> -Type <type> -Value <address> -Comment <comment text>

    where:

    • <server name> is the name of the protected Microsoft Exchange server in FQDN format. If you use any profiles to manage servers, you can replace -Server <server name> with -Profile <profile name>.
    • <type> is the address entry type (EmailAddress — Email address; IpAddress — IP address).
    • <address> is the email address, email address mask, or IP address.
    • <comment text> is a comment on the record. Optional setting.

    The record with the specified settings will be added to the list.

To copy records from the address denylist on Server 2 to the address denylist on Server 1:

  1. Run command:

    Get-KSEAntiSpamBlackList -Server <Server 2 name> | Add-KSEAntiSpamBlackListItem -Server <Server 1 name>

    where:

    • <Server 1 name> is the name of the server on which you want to add records to the address denylist.
    • <Server 2 name> is the name of the server from which you want to copy records from the address denylist.

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

    Records from the address denylist on Server 2 will be added to the address denylist on Server 1. A new record ID will be created for each record being added. If the address in the record being copied from Server 2 has already been used in any record on Server 1, that record will not be copied.

    You can use filtering commands to select records that you need to add in the list (see examples).

    Examples:

    1. Adding a record containing a sender address defined as email address user@mail.com to the address denylist on server.domain.com.

    Add-KSEAntiSpamBlackListItem -Server server.domain.com -Type EmailAddress -Value "user@mail.com" -Comment "Comment text"

    2. Copying records from the address denylist of profilename to the address denylist on server.domain.com.

    Get-KSEAntiSpamBlackList -Profile profilename | Add-KSEAntiSpamBlackListItem -Server server.domain.com

    3. Copying records containing IP addresses from the address denylist on server1.domain.com to the address denylist on server2.domain.com.

    Get-KSEAntiSpamBlackList -Server server1.domain.com | Where-Object {$_.ItemType -eq "IpAddress"} | Add-KSEAntiSpamBlackListItem -Server server2.domain.com

Page top