Limiting the outgoing mails to specific domains in Reporting Services

Many people have faced problems configuring Reporting Server to limit the outgoing mails to two/more specific domains. They tried the following configuration but it did not work and it sends email to everyone regardless of the domain.

<Configuration>
<RSEmailDPConfiguration>
<PermittedHosts>MyHome.com,MyCorp.com</PermittedHosts>
</RSEmailDPConfiguration>
</Configuration>

After no luck with the above changes, some of us have also tried:

1. Specifying the IP address instead of the domain name.
2. Specifying the single IP address.
3. Specifying the single domain name.
4. Specifying the single domain name in both DefaultHostName and PermittedHosts.
5. Specifying the DNS IP address of the domains.

The following link is the MSDN documentation about this.

https://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsadmin/htm/arp_configserver_v1_4bzl.asp

So the solution to this is to create <HostName> element entry within <PermittedHosts></PermittedHosts> elements in the rsreportserver.config file for each allowed domain.

So for the above example, if we have to limit/restrict the outgoing emails from Reporting Services to MyHome.com and MyCorp.com, we should create a <HostName> entry each for the domain as shown:

<PermittedHosts>
<HostName>MyHome.com</HostName>
<HostName>MyCorp.com</HostName>
</PermittedHosts>

This will restrict/limit the emails to above mentioned domains only.