I would like to create a connector in Office 365 Exchange Online that will redirect emails that are sent to a pre-defined domain to a specific IP address and specific port.
In my on-premise Exchange server I did it using a power shell command since the port number is not exposed to the Exchange server’s GUI, so the default port is 25. For example, I would like emails that are sent by the users to XYZ.COM domain to be sent to IP address 22.214.171.124 port 30001. The power shell command I used is the following:
New-SendConnector -Name SpecialConnector -AddressSpaces "SMTP:*.XYZ.COM" -Custom -DnsRoutingEnabled $false -SmartHosts 126.96.36.199 -SourceTransportServer <My Exchange server IP address> -Port 30001
This worked fine.
Can the same be done in Exchange Online? If I’m not mistaken (and maybe I am) the port number is not exposed to the Exchange Online’s GUI, so how can I change it anyway?