Kaspersky Security 9.x for Microsoft Exchange Servers

Adding addresses to the Anti-Spam address allowlist

April 2, 2024

ID 128872

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

You can:

  • Add a new record to the address allowlist.
  • Copy records from another address allowlist (for example, located on a different protected server) to this address allowlist.

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

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

    Add-KSEAntiSpamWhiteList -Server <server name> -Type <type> -Value <address> -Role <role> -Scope <scope> -Comment <comment text>

    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>.
    • <scope> is the record scope (MassMail — Bulk email can be let in under this record; All — Both spam and bulk email can be let in under this record).
    • <role> is the address destination in the record (Sender — Sender address; Recipient — Recipient address).
    • <type> is the address entry type (EmailAddress — Email address; IpAddress — IP address; AdUser — Active Directory user; AdGroup — Active Directory user group).
    • <address> is the email address, email address mask, IP address, or GUID of the user account or Active Directory group.
    • <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 allowlist on Server 2 to the address allowlist on Server 1:

  1. Run command:

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

    where:

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

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

    Records from the address allowlist on Server 2 will be added to the address allowlist 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 IP address 192.168.1.1 to the address allowlist on server.domain.com:

    Add-KSEAntiSpamWhiteListItem -Server server.domain.com -Type IpAddress -Value "192.168.1.1" -Role Sender -Scope All -Comment "Comment text"

    2. Adding a record containing a recipient address defined as username to the address allowlist on server.domain.com:

    Add-KSEAntiSpamWhiteListItem -Server server.domain.com -Type AdUser -Value (Get-ADUser username).ObjectGUID -Role Recipient -Scope All -Comment "Comment text"

    3. Copying records from the address allowlist on server1.domain.com to the address allowlist on server2.domain.com:

    Get-KSEAntiSpamWhiteList -Server server1.domain.com | Add-KSEAntiSpamWhiteListItem -Server server2.domain.com

    4. Copying records containing sender addresses from the address allowlist in profile1 to the address allowlist in profile2:

    Get-KSEAntiSpamWhiteList -Profile profile1 | Where-Object {$_.IsSender -eq "True"} | Add-KSEAntiSpamWhiteListItem -Profile profile2

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.