Guide/EmailThroughOffice365
From Convention Master Documentation
Sending Emails through Microsoft 365
CM can be set up to send emails through Microsoft 365, but it requires some configuration within Exchange Online first.
Prerequisites
These are things you need first in order to follow this guide.
- Admin access within Microsoft 365.
- Admin access to your domain's DNS records.
- Admin access within CM.
- Outbound access from CM on port 25.
- A static IP address for CM (you probably already have this).
Process
Step 1: Creating a connector
- Log into https://admin.exchange.microsoft.com using an account with admin rights.
- In the left side menu, go to Mail flow -> Connectors
- Click "Add a connector"
- From "Your organization"
- Give it a name, maybe something like "Email from CM", and make sure the connector will be turned on
- Select the option to verify by IP address
- Type in the static IP address for your CM server
- Make sure you click the plus button after typing it in, to move it into the list under the text box
- Make sure the settings are good, then click the finish button.
Step 2: Update your SPF record
- Locate your SPF record in DNS. It will be a TXT record that starts with "v=spf1" and ends with something like "~all" or "-all"
- Somewhere between those two records at either end, you need to insert a new selector "ip4:<your CM IP address>"
- Save the updated record
- Check your MX record and get your Microsoft 365 endpoint. It will probably be something like "domain-tld.mail.protection.outlook.com"--you may not have this listed if your domain is using some other spam filtering service in front of 365, but you do need the Microsoft endpoint for the next step.
Step 3: Connect CM to Microsoft 365
When you configure the email server in CM, use the following settings:
- Send method: SMTP
- Server address: tls://<365 endpoint>
- Server port: 25
- Connection security: TLS
- Password authentication: unchecked
You need to make sure that you send emails from an address which ends in your domain name. The sending address does not need to exist in Microsoft 365.
Step 4 (only if your CM server has an IPv6 address!)
If (and only if) your CM server has an IPv6 address, you may experience problems sending email through Microsoft 365 if you don't follow these steps! Microsoft 365 can't add IPv6 addresses to connector settings, which prevents any IPv6 connections from being able to authenticate and send email.
If a AAAA record exists for your 365 endpoint,
EITHER
- Disable IPv6 on your CM server
OR
- Connect to Exchange Online by using PowerShell
- Disable-IPv6ForAcceptedDomain -Domain "domain.tld"