Configure Microsoft 365 with Black Pearl Mail

Configure Microsoft 365 with Black Pearl Mail

These steps will route all of your users through the Black Pearl Mail platform. If you would prefer to start with a test/pilot group before rolling out with all of your users, follow these instructions.

The following steps will need to be done within your organization's M365 Global Administrator dashboard. 

STEP 1 – Log in to M365

1. Open the Microsoft 365 admin console -

2. Click on Exchange.

STEP 2 - Setup Inbound Connector

1. Select Mail flow from the right-hand side menu.

2. Select Connectors.
  1.  Click  +Add a Connector

4. In the pop-up window make the following changes: 
  1. Connection From: Your organization's email server
  2. Connection To:  Office 365 (This may auto-fill after selecting, "Your organization's email server")
  3. Click Next

5. Make the following changes:
  1. Name: Black Pearl Mail Inbound.
  2. Ensure Turn it on is checked.
  3. Ensure Retain internal Exchange email Headers (recommended) is checked.
  4. Click Next.

6. Select By verifying that the subject name on the certificate that the sending server uses to authenticate with Office 365 match the domain name (recommended).
  1. Enter *
  2. Click Next.

7. Click Create Connector.

8. Click Add another connector.

STEP 3 - Setup Outbound Connector

1. Select the following: 
  1. From: Office 365.
  2. To:  Your organization's email server. ( This may auto-fill after selecting "Office 365")
  3. Click Next.

2. Proceed with the following
  1. Enter the name: Black Pearl Mail Outbound
  2. Ensure the following settings are both checked:
    1. Turn it on
    2. Retain internal Exchange email headers (recommended)

3. Select Only when I have a transport rule set up that redirects messages to this connector.
  1. Click Next

4. Enter
  1. Click the + button to the right of the text box.

  1. Click Next.

Ensure the following options are selected:
  1. Always use Transport Layer Security (TLS) to secure the connection.
  2. Issued by a trusted certificate authority (CA).

5. Check the box: And the subject name or subject alternative name (SAN) matches this domain name:
  1. Enter the following in the text field: *
  2. Click Next.

7. Enter the following: 
  1. Click the + to the right of the text field. 

9. Click Validate.

10. Ensure that "Check connectivity to" succeeds.
“Send test email” may fail, this is not an issue. Microsoft sends the test email from an unvalidated domain which doesn’t pass security criteria sometimes. If this field fails please click "Yes" above the +
  1. Click Next

  1. Click Create Connector

STEP 4 - Setup Mail Flow Rules

1. Under Mail Flow select Rules.

2. Click + and select Create a new rule.

3. Scroll down and click More Options.

If you would prefer to set up a test group and have specific users test the system before deploying for your entire organization, follow the steps here.

4. Under Name type the following: Black Pearl Mail

5. Under Apply the Rule if...
  1. Select The sender is located... and then select is external/internal in the secondary pop-up window.
6. In the pop-up window, select Inside the organization and click OK.
This option may be selected by default. If so, just click OK.


7. Under Do the following...
  1. click the dropdown and select Redirect the message to... then select the following connector in the secondary pop-up window.

8. Select Black Pearl Mail Outbound and click OK.
This option may be selected by default. If so, just click OK


9. Under Except if...
  1. Click add exception.

10. In the drop-down select The message properties... and then includes the message type.

11. In the dropdown, select Calendaring, and then click OK. 

12. Under Except if...
  1. Click on add exception.

13. In the drop-down select A message header… and then select matches these text patterns.

14. Click on Enter text...

15. Enter the following: X-BP 
  1. Click OK.

16. Click on Enter text patterns...

17. Enter the following: ^*$ 
  1. Click + to add it.
  2. Click OK

  1.  Click OK

18. Under Except if...
  1. Click add exception.

19. Under the dropdown select The Sender... In the secondary pop-up window, select Domain is.


20. Enter the following:
  1. Click + to add it.
  1. Click OK

21. Scroll down to Match sender address in message: and change to Envelope. Click Save

If there are other rules set up, then the Black Pearl rule will need to be set to Priority 0. If needed, edit the Black Pearl Mail rule to set the priority. Select the Black Pearl Mail rule and edit on the edit icon.


1. Under Priority set the value to and then click Save.

That completes the settings needed in O365. You are now configured to route with Black Pearl Mail. Please note these settings can take up to an hour to complete. 

Next, you'll want to create signature templates, add user details, and lastly, turn on signatures for your users. We have provided some helpful resources below.
  1. Getting Started: Use the Same Branded Email Template for all Users
  2. Getting Started: Use Different Branded Email Templates for Different Groups of Users