Configuring a Web Proxy for NoSpamProxy 9.2 and higher

Please also note the information in the article How to configure a web proxy for the Core Antispam Engine.

Gateway Role

NOTE: Always edit a copy of the original file.

NOTE: Copy-and-paste does not work because invisible control characters are also copied.

  1. Open the file NoSpamProxy.GatewayRole.exe.config from the directory C:\Program Files\NoSpamProxy\Gateway Role.
  2. Add the following lines below the line:

    <system.net>

    <defaultProxy>

    <proxy

    usesystemdefault="true"

    proxyaddress="http://192.168.1.10:3128"

    bypassonlocal="true"

    />

    </defaultProxy>

    </system.net>

  3. Adjust the IP address of your proxy server accordingly. Die Datei muss dann ungefähr wie folgt aussehen:

    <?XML version="1.0" encoding="utf-8"?>

    <configuration>

    <runtime>

    <gcServer enabled="true" />

    <generatePublisherEvidence enabled="false"/>

    <assemblyBinding >

    <dependentAssembly>

    <assemblyIdentity name="Microsoft.Practices.Unity" publicKeyToken="31bf3856ad364e35" culture="neutral" />

    <bindingRedirect oldVersion="0.0.0.0-2.1.505.0" newVersion="2.1.505.0" />

    </dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />

    <bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />

    </dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="Microsoft.Practices.ServiceLocation" publicKeyToken="31bf3856ad364e35" culture="neutral" />

    <bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" />

    </dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />

    <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />

    </dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />

    <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />

    </dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />

    <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />

    </dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />

    <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />

    </dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral" />

    <bindingRedirect oldVersion="0.0.0.0-5.6.2.0" newVersion="5.6.2.0" />

    </dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />

    <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />

    </dependentAssembly>

    </assemblyBinding>

    </runtime>

    <system.net>

    <defaultProxy>

    <proxy

    usesystemdefault="true"

    proxyaddress="http://192.168.1.10:3128"

    bypassonlocal="true"

    />

    </defaultProxy>

    </system.net>​​

    </configuration>

  4. (Optional) If you want to define exceptions, add the following section directly above the line </defaultProxy>:

    <bypasslist>

    <add address="[a-z]+\.contoso\.com$" />

    <add address="192\.168\.\d{1,3}\.\d{1,3}" />

    <add address="intranet.nospamproxy.de" />

    </bypasslist>

  5. (Optional) If you want to ensure that no web proxy is used, enter the following:

    <system.net>

    <defaultProxy enabled="false" />

    </system.net>

  6. Restart the Gateway Role.

NOTE: Please note that with each patch/upgrade the file may be overwritten and the changes must be made again.

So that queries that are made directly via Windows components can also be made via the proxy (such as a possible CRL check), you must still store the proxy in the system.

To do this, run the following command as an administrator, which applies the proxy settings from Internet Explorer to the system components:

netsh winhttp import proxy source=ie

Intranet Role

To assign a proxy to the intranet role, proceed as described above, i.e. via the NoSpamProxy.IntranetRole.exe.config from the directory ..\NoSpamProxy\Intranet Role.

NOTE: Note that the Intranet Role requires direct communication with the Gateway Role. You should therefore define proxy exceptions for the Gateway Role(s).

Web Portal

  • The web proxy is stored for the Web Portal in the same way as for the gateway, but in the file web.config (not webportal.config).
  • The path when installing with versions 13.2 or lower is C:\Program Files\Net at Work Mail Gateway\enQsig Web Portal\Web.config.
  • The path for new installations with version 14 is C:\Program Files\NoSpamProxy\Webportal\Web.config.

Outlook Add-in

If you are using a Web proxy with authentication on the client PC, the NoSpamProxy Outlook Add-In may not be able to upload files to the Web Portal from the client PC because the information from the system variables does not apply here. To make this information available to the add-in, you must perform the following steps:

  1. In the Microsoft Outlook installation directory, create a new Outlook.exe.config file next to Outlook.exe.
  2. Fill this file with the following information and save it:

    <configuration>

    <system.net>

    <defaultProxy useDefaultCredentials="true" />

    </system.net>

    </configuration>

  3. Restart Outlook.

NOTE: For more information, see this Microsoft page.

See also

How to configure a web proxy for the Core Antispam Engine