How to Whitelist an IP Address in Exchange 2013 and 2016
To complete this procedure, you must have security administrator privileges with the Microsoft Security & Compliance Center or be a member of the Microsoft Exchange Online Organization Management administrator group.
From the left sidebar menu, go to Mail flow > Connectors.
Click Add a connector.
Select Partner organization in the Connection from the section.
Give the connector a name and click Next.
In the Authenticating sent email window, select the option that states By verifying that the IP address of the sending server matches one of the following IP addresses that belong to your partner organization.
Enter the IP addresses and click Next.
Uncheck the TLS option stating Reject email messages if they are not sent over.
Click Next, then click Save to complete the process.
You must complete the following steps once the connector is defined.
Go to the Mail flow > Rules page in the left sidebar menu.
Click the + icon on the screen and select Bypass spam filtering.
In the New rule window, give the rule a name and select The sender is ... > IP address is in any of these ranges or exactly matches.
Enter the IP addresses and click OK.
In the Do the following section, select Set the message header to this value ... > Set a message header and enter “X-MS-Exchange-Organization-Bypass Clutter” in the text field, and click OK.
Set the value information to true with the enter text option on the right.