G DATA Mail Protection

Create connectors and a rule

This article describes how to create an outbound connector and an inbound connector and use a rule to route your email traffic through G DATA Mail Protection.

The required steps can be performed either using Exchange PowerShell commands or through the Microsoft Exchange admin center interface:


Configure Windows PowerShell to connect to Microsoft 365 (Exchange Online PowerShell)

1.

Open PowerShell. Enter the following command to install the Exchange Online management module:

Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.4.0

Respond to the prompts with Y.

2.

Start the connection using the following command:

Connect-ExchangeOnline -UserPrincipalName MaxMustermann@x-company.cloud -ExchangeEnvironmentName O365Default

Replace the user MaxMustermann@x-company.cloud with your own user account!

Show screenshot.
G DATA Mail Protection PowerShell connection

3.

A sign-in window opens. Enter your password here.

Show screenshot
G DATA Mail Protection Connect PowerShell to Exchange Online

4.

Continue with the section
Create connectors and a rule using Exchange Online PowerShell

Create connectors and a rule using Exchange Online PowerShell

1.

Open Exchange Online PowerShell and sign in to Office 365. (For assistance, see the section
Configure Windows PowerShell to connect to Microsoft 365)

2.

Create a new outbound connector using the following command:

New-OutboundConnector -Name 'G DATA 365 Mail Protection' -ConnectorType 'Partner'  -IsTransportRuleScoped:$True -UseMXRecord:$false -SmartHosts 'mailprotection.gdata.de' -TlsSettings 'CertificateValidation'

3.

Create a rule using the following command:

New-TransportRule -Name 'Redirect to mailprotection.gdata.de' -FromScope NotInOrganization -RecipientDomainIs x-company.cloud,x-company.onmicrosoft.com -ExceptIfSenderIpRanges '194.156.84.32/28' -SetAuditSeverity High -RouteMessageOutboundConnector 'G DATA 365 Mail Protection'

Replace the domains x-company.cloud and x-company.onmicrosoft.com with your own domain names.

4.

Create a new inbound connector using the following command:

New-InboundConnector -Name "G DATA Mailprotection Inbound Secure Connector" -ConnectorType 'Partner'  -SenderDomains * -SenderIPAddresses 194.156.84.32/28 -RestrictDomainsToIPAddresses $true -RequireTLS $true -EFSkipLastIP $false -EFSkipIPs 194.156.84.32/28
This command also enables Enhanced Filtering for Connectors in the same step.

Create connectors and a rule through the Microsoft Exchange admin center

1.

Open the Exchange admin center and sign in.

2.

Select Mail flow and Connectors.

Click Next.

Show screenshot
G DATA Mail Protection

3.

Click Connectorhinzufuegen.

4.

Select:

  • Connection from: Office 365

  • Connection to: Partner organization

Click Next.

Show screenshot
G DATA Mail Protection Add partner organization connector

5.

Enter the name G DATA 365 Mail Protection and, optionally, a description. Select the Turn it on checkbox.

Click Next.

Show screenshot
G DATA Mail Protection Connector name

6.

Select: Only when I have a transport rule set up that redirects messages to this connector.

Click Next.

Show screenshot
G DATA Mail Protection

7.

Select: Route email through these smart hosts and enter mailprotection.gdata.de as the smart host. Use + to add it to the smart host list.

Click Next.

Show screenshot
G DATA Mail Protection

8.

Select: Always use Transport Layer Security (TLS) to secure the connection (recommended) and Issued by a trusted certificate authority (CA).

Click Next.

Show screenshot
G DATA Mail Protection TLS

9.

Create a list containing at least one of your email addresses for each domain (add addresses using +), then click Validate to validate the connector against these email addresses.

This test should complete without errors. If problems occur, refer to our connector configuration notes, among other resources.

Click Next.

Show screenshot
G DATA Mail Protection

10.

Review the settings in the summary and click Create connector.

Click Done.

Show screenshot
G DATA Mail Protection

11.

Click Connectorhinzufuegen.

12.

Select:
Connection from: Partner organization

Click Next.

Show screenshot
G DATA Mail Protection New inbound connector

13.

Enter the name G DATA Mailprotection Inbound Secure Connector and, optionally, a description. Select the Turn it on checkbox.

Click Next.

Show screenshot
G DATA Mail Protection

14.

Select By verifying that the IP address of the sending server matches one of the following IP addresses, which belong to your partner organization.

Enter the IP range 194.156.84.32/28 and use + to add it to the list.

Click Next.

Show screenshot
G DATA Mail Protection Add inbound connector IP

15.

Select the checkbox to reject email messages if they are not sent over TLS.

Click Next.

Show screenshot
G DATA Mail Protection Inbound connector TLS

16.

Review the settings in the summary and click Create connector.

Click Done.

17.

18.

The inbound connector you just created is listed here with Enhanced filtering disabled.

Click the row for the G DATA Mailprotection Inbound Secure Connector connector. An editing panel opens on the right side of the screen.

Select Skip these IP addresses that are associated with the connector:. Enter the IP range 194.156.84.32/28.

Select Apply to entire organization and click Save.

Show screenshot
G DATA Mail Protection Enable enhanced filtering for inbound connector

19.

Filtering for the connector is now displayed as On.

Show screenshot
G DATA Mail Protection Inbound connector enhanced filtering

20.

Show screenshot
G DATA Mail Protection

21.

Click AddRegel and select Create a new rule.

Show screenshot
G DATA Mail Protection Add new rule

22.

Enter Redirect to mailprotection.gdata.de as the rule name.

Under Apply this rule if, select the following values from the drop-down menus:

The sender and is external/internal

Show screenshot
G DATA Mail Protection Add new rule

23.

A side panel opens on the right side of the screen.

Select Outside the organization and click Save.

Show screenshot
G DATA Mail Protection Add new rule

24.

Use + to add a new AND condition and select The recipient and domain is from the drop-down menus.

Show screenshot
G DATA Mail Protection Add new rule

25.

Create a list of all domains to be scanned by G DATA Mail Protection. If there are multiple domains, each domain must be entered individually and added to the list using the Add button.

Be sure to follow our configuration notes for the connectors and the rule at this stage.

Then click Save.

Show screenshot
G DATA Mail Protection Add new rule

26.

Under Do the following, select the following values from the drop-down menus:

  • Redirect the message to and the following connector

Show screenshot
G DATA Mail Protection Add new rule

27.

A side panel opens on the right side of the screen.

Select the G DATA 365 Mail Protection connector and click Save.

Show screenshot
G DATA Mail Protection Add new rule

28.

Under Except if, select the following values from the drop-down menus:

  • The sender and IP address is in any of these ranges or exactly matches

Show screenshot
G DATA Mail Protection Add new rule

29.

A side panel opens on the right side of the screen.

Enter the following IP range: 194.156.84.32/28 and click Save.

Show screenshot
G DATA Mail Protection Add new rule

30.

Click Next.

31.

Configure the following settings for the rule:

Rule mode = Enforce Severity = High

Show screenshot
G DATA Mail Protection Add new rule

32.

Click Next.

33.

Review the settings and click Finish.

Show screenshot
G DATA Mail Protection Add new rule

34.

Click the row for the rule you created in the Exchange admin center and enable the rule using the toggle in the panel that opens on the right side of the screen.

Show screenshot
G DATA Mail Protection Enable new rule