Microsoft Exchange 365



In Exchange server, type the name of your Exchange server. If you’re connecting to your Microsoft 365 email, the Exchange server name is partner.outlook.cn. If you’re not using Microsoft 365, see Find your Exchange server name later in this article. The Domain box will be populated with the text Optional. Leave the Domain text box empty. Sign in with PIN or smartcard.

Microsoft Exchange 365 Mail

-->

Important

The improved Microsoft 365 security center is now available. This new experience brings Defender for Endpoint, Defender for Office 365, Microsoft 365 Defender, and more into the Microsoft 365 security center. Learn what's new.

Applies to

Domain-based Message Authentication, Reporting, and Conformance (DMARC) works with Sender Policy Framework (SPF) and DomainKeys Identified Mail (DKIM) to authenticate mail senders and ensure that destination email systems trust messages sent from your domain. Implementing DMARC with SPF and DKIM provides additional protection against spoofing and phishing email. DMARC helps receiving mail systems determine what to do with messages sent from your domain that fail SPF or DKIM checks.

Tip

Visit the Microsoft Intelligent Security Association (MISA) catalog to view third-party vendors offering DMARC reporting for Microsoft 365.

How do SPF and DMARC work together to protect email in Microsoft 365?

An email message may contain multiple originator or sender addresses. These addresses are used for different purposes. For example, consider these addresses:

  • 'Mail From' address: Identifies the sender and specifies where to send return notices if any problems occur with the delivery of the message, such as non-delivery notices. This appears in the envelope portion of an email message and is not usually displayed by your email application. This is sometimes called the 5321.MailFrom address or the reverse-path address.

  • 'From' address: The address displayed as the From address by your mail application. This address identifies the author of the email. That is, the mailbox of the person or system responsible for writing the message. This is sometimes called the 5322.From address.

SPF uses a DNS TXT record to provide a list of authorized sending IP addresses for a given domain. Normally, SPF checks are only performed against the 5321.MailFrom address. This means that the 5322.From address is not authenticated when you use SPF by itself. This allows for a scenario where a user can receive a message which passes an SPF check but has a spoofed 5322.From sender address. For example, consider this SMTP transcript:

In this transcript, the sender addresses are as follows:

  • Mail from address (5321.MailFrom): phish@phishing.contoso.com

  • From address (5322.From): security@woodgrovebank.com

If you configured SPF, then the receiving server performs a check against the Mail from address phish@phishing.contoso.com. If the message came from a valid source for the domain phishing.contoso.com then the SPF check passes. Since the email client only displays the From address, the user sees that this message came from security@woodgrovebank.com. With SPF alone, the validity of woodgrovebank.com was never authenticated.

When you use DMARC, the receiving server also performs a check against the From address. In the example above, if there is a DMARC TXT record in place for woodgrovebank.com, then the check against the From address fails.

What is a DMARC TXT record?

Like the DNS records for SPF, the record for DMARC is a DNS text (TXT) record that helps prevent spoofing and phishing. You publish DMARC TXT records in DNS. DMARC TXT records validate the origin of email messages by verifying the IP address of an email's author against the alleged owner of the sending domain. The DMARC TXT record identifies authorized outbound email servers. Destination email systems can then verify that messages they receive originate from authorized outbound email servers.

Microsoft's DMARC TXT record looks something like this:

Microsoft sends its DMARC reports to Agari, a third party. Agari collects and analyzes DMARC reports. Please visit the MISA catalog to view more third-party vendors offering DMARC reporting for Microsoft 365.

Implement DMARC for inbound mail

You don't have to do a thing to set up DMARC for mail that you receive in Microsoft 365. We've taken care of everything for you. If you want to learn what happens to mail that fails to pass our DMARC checks, see How Microsoft 365 handles inbound email that fails DMARC.

Implement DMARC for outbound mail from Microsoft 365

If you use Microsoft 365 but you aren't using a custom domain, that is, you use onmicrosoft.com, you don't need to do anything else to configure or implement DMARC for your organization. SPF is already set up for you and Microsoft 365 automatically generates a DKIM signature for your outgoing mail. For more information about this signature, see Default behavior for DKIM and Microsoft 365.

If you have a custom domain or you are using on-premises Exchange servers in addition to Microsoft 365, you need to manually implement DMARC for your outbound mail. Implementing DMARC for your custom domain includes these steps:

Step 1: Identify valid sources of mail for your domain

If you have already set up SPF then you have already gone through this exercise. However, for DMARC, there are additional considerations. When identifying sources of mail for your domain there are two questions you need to answer:

  • What IP addresses send messages from my domain?

  • For mail sent from third parties on my behalf, will the 5321.MailFrom and 5322.From domains match?

Step 2: Set up SPF for your domain

Now that you have a list of all your valid senders you can follow the steps to Set up SPF to help prevent spoofing.

For example, assuming contoso.com sends mail from Exchange Online, an on-premises Exchange server whose IP address is 192.168.0.1, and a web application whose IP address is 192.168.100.100, the SPF TXT record would look like this:

As a best practice, ensure that your SPF TXT record takes into account third-party senders.

Step 3: Set up DKIM for your custom domain

Once you have set up SPF, you need to set up DKIM. DKIM lets you add a digital signature to email messages in the message header. If you do not set up DKIM and instead allow Microsoft 365 to use the default DKIM configuration for your domain, DMARC may fail. This is because the default DKIM configuration uses your initial onmicrosoft.com domain as the 5322.From address, not your custom domain. This forces a mismatch between the 5321.MailFrom and the 5322.From addresses in all email sent from your domain.

If you have third-party senders that send mail on your behalf and the mail they send has mismatched 5321.MailFrom and 5322.From addresses, DMARC will fail for that email. To avoid this, you need to set up DKIM for your domain specifically with that third-party sender. This allows Microsoft 365 to authenticate email from this 3rd-party service. However, it also allows others, for example, Yahoo, Gmail, and Comcast, to verify email sent to them by the third-party as if it was email sent by you. This is beneficial because it allows your customers to build trust with your domain no matter where their mailbox is located, and at the same time Microsoft 365 won't mark a message as spam due to spoofing because it passes authentication checks for your domain.

For instructions on setting up DKIM for your domain, including how to set up DKIM for third-party senders so they can spoof your domain, see Use DKIM to validate outbound email sent from your custom domain.

Step 4: Form the DMARC TXT record for your domain

Although there are other syntax options that are not mentioned here, these are the most commonly used options for Microsoft 365. Form the DMARC TXT record for your domain in the format:

where:

  • domain is the domain you want to protect. By default, the record protects mail from the domain and all subdomains. For example, if you specify _dmarc.contoso.com, then DMARC protects mail from the domain and all subdomains, such as housewares.contoso.com or plumbing.contoso.com.

  • TTL should always be the equivalent of one hour. The unit used for TTL, either hours (1 hour), minutes (60 minutes), or seconds (3600 seconds), will vary depending on the registrar for your domain.

  • pct=100 indicates that this rule should be used for 100% of email.

  • policy specifies what policy you want the receiving server to follow if DMARC fails. You can set the policy to none, quarantine, or reject.

For information about which options to use, become familiar with the concepts in Best practices for implementing DMARC in Microsoft 365.

Examples:

  • Policy set to none

  • Policy set to quarantine

  • Policy set to reject

Once you have formed your record, you need to update the record at your domain registrar. For instructions on adding the DMARC TXT record to your DNS records for Microsoft 365, see Create DNS records for Microsoft 365 when you manage your DNS records.

Best practices for implementing DMARC in Microsoft 365

You can implement DMARC gradually without impacting the rest of your mail flow. Create and implement a roll-out plan that follows these steps. Do each of these steps first with a sub-domain, then other sub-domains, and finally with the top-level domain in your organization before moving on to the next step.

  1. Monitor the impact of implementing DMARC

    Start with a simple monitoring-mode record for a sub-domain or domain that requests that DMARC receivers send you statistics about messages that they see using that domain. A monitoring-mode record is a DMARC TXT record that has its policy set to none (p=none). Many companies publish a DMARC TXT record with p=none because they are unsure about how much email they may lose by publishing a more restrictive DMARC policy.

    You can do this even before you've implemented SPF or DKIM in your messaging infrastructure. However, you won't be able to effectively quarantine or reject mail by using DMARC until you also implement SPF and DKIM. As you introduce SPF and DKIM, the reports generated through DMARC will provide the numbers and sources of messages that pass these checks, and those that don't. You can easily see how much of your legitimate traffic is or isn't covered by them, and troubleshoot any problems. You'll also begin to see how many fraudulent messages are being sent, and from where.

  2. Request that external mail systems quarantine mail that fails DMARC

    When you believe that all or most of your legitimate traffic is protected by SPF and DKIM, and you understand the impact of implementing DMARC, you can implement a quarantine policy. A quarantine policy is a DMARC TXT record that has its policy set to quarantine (p=quarantine). By doing this, you are asking DMARC receivers to put messages from your domain that fail DMARC into the local equivalent of a spam folder instead of your customers' inboxes.

  3. Request that external mail systems not accept messages that fail DMARC

    The final step is implementing a reject policy. A reject policy is a DMARC TXT record that has its policy set to reject (p=reject). When you do this, you're asking DMARC receivers not to accept messages that fail the DMARC checks.

  4. How to set up DMARC for subdomain?

    DMARC is implemented by publishing a policy as a TXT record in DNS and is hierarchical (e.g. a policy published for contoso.com will apply to sub.domain.contonos.com unless a different policy is explicitly defined for the subdomain). This is useful as organizations may be able to specify a smaller number of high-level DMARC records for wider coverage. Care should be taken to configure explicit subdomain DMARC records where you do not want the subdomains to inherit the top-level domain's DMARC record.

    Also, you can add a wildcard-type policy for DMARC when subdomains shouldn't be sending email, by adding the sp=reject value. For example:

How Microsoft 365 handles outbound email that fails DMARC

If a message is outbound from Microsoft 365 and fails DMARC, and you have set the policy to p=quarantine or p=reject, the message is routed through the High-risk delivery pool for outbound messages. There is no override for outbound email.

If you publish a DMARC reject policy (p=reject), no other customer in Microsoft 365 can spoof your domain because messages will not be able to pass SPF or DKIM for your domain when relaying a message outbound through the service. However, if you do publish a DMARC reject policy but don't have all of your email authenticated through Microsoft 365, some of it may be marked as spam for inbound email (as described above), or it will be rejected if you do not publish SPF and try to relay it outbound through the service. This happens, for example, if you forget to include some of the IP addresses for servers and apps that send mail on behalf of your domain when you form your DMARC TXT record.

How Microsoft 365 handles inbound email that fails DMARC

If the DMARC policy of the sending server is p=reject, Exchange Online Protection (EOP) marks the message as spoof instead of rejecting it. In other words, for inbound email, Microsoft 365 treats p=reject and p=quarantine the same way. Admins can define the action to take on messages classified as spoof within the anti-phishing policy.

Microsoft 365 is configured like this because some legitimate email may fail DMARC. For example, a message might fail DMARC if it is sent to a mailing list that then relays the message to all list participants. If Microsoft 365 rejected these messages, people could lose legitimate email and have no way to retrieve it. Instead, these messages will still fail DMARC but they will be marked as spam and not rejected. If desired, users can still get these messages in their inbox through these methods:

  • Users add safe senders individually by using their email client.

  • Administrators can update the Spoof Intelligence reporting to allow the spoof.

  • Administrators create an Exchange mail flow rule (also known as a transport rule) for all users that allows messages for those particular senders.

For more information, see Create safe sender lists.

How Microsoft 365 utilizes Authenticated Received Chain (ARC)

All hosted mailboxes in Microsoft 365 will now gain the benefit of ARC with improved deliverability of messages and enhanced anti-spoofing protection. ARC preserves the email authentication results from all participating intermediaries, or hops, when an email is routed from the originating server to the recipient mailbox. Before ARC, modifications performed by intermediaries in email routing, like forwarding rules or automatic signatures, could cause DMARC failures by the time the email reached the recipient mailbox. With ARC, the cryptographic preservation of the authentication results allows Microsoft 365 to verify the authenticity of an email's sender.

Microsoft 365 currently utilizes ARC to verify authentication results when Microsoft is the ARC Sealer, but plan to add support for third-party ARC sealers in the future.

Troubleshooting your DMARC implementation

If you have configured your domain's MX records where EOP is not the first entry, DMARC failures will not be enforced for your domain.

If you're a customer, and your domain's primary MX record does not point to EOP, you will not get the benefits of DMARC. For example, DMARC won't work if you point the MX record to your on-premises mail server and then route email to EOP by using a connector. In this scenario, the receiving domain is one of your Accepted-Domains but EOP is not the primary MX. For example, suppose contoso.com points its MX at itself and uses EOP as a secondary MX record, contoso.com's MX record looks like the following:

All, or most, email will first be routed to mail.contoso.com since it's the primary MX, and then mail will get routed to EOP. In some cases, you might not even list EOP as an MX record at all and simply hook up connectors to route your email. EOP does not have to be the first entry for DMARC validation to be done. It just ensures the validation, as we cannot be certain that all on-premise/non-O365 servers will do DMARC checks. DMARC is eligible to be enforced for a customer's domain (not server) when you set up the DMARC TXT record, but it is up to the receiving server to actually do the enforcement. If you set up EOP as the receiving server, then EOP does the DMARC enforcement.

For more information

Want more information about DMARC? These resources can help.

Microsoft Exchange 365

Microsoft 365 Login

  • Anti-spam message headers includes the syntax and header fields used by Microsoft 365 for DMARC checks.

  • Take the DMARC Training Series from M3AAWG (Messaging, Malware, Mobile Anti-Abuse Working Group).

  • Use the checklist at dmarcian.

  • Go directly to the source at DMARC.org.

See also

Summary

This article describes how to configure the Microsoft Dynamics CRM E-mail Router with Microsoft Office 365 Exchange Online for incoming and outgoing email messages.

Microsoft Exchange 365 Plans

More Information

When you configure the Microsoft Dynamics CRM E-mail Router with Office 365 Exchange Online, you must follow specific requirements for incoming and outgoing messages.

How to configure an outgoing profile

To configure an outgoing profile for Exchange Online, follow these steps:

  1. Click Start, click All Programs, click Microsoft Dynamics CRM 2011 E-mail Router, and then click Microsoft Dynamics CRM E-mail Router Configuration.

  2. Click Configuration Profiles, and then click New

  3. In the E-mail Router Configuration Profile dialog box, type a profile name. For example, type OutgoingExchangeOnlineE-mail.

  4. For the direction, select Outgoing.

  5. For the email server type, select Exchange Online. The Protocol value automatically changes to Exchange Web Services, and the Authentication Type value automatically changes to Clear Text.
    Important Clear Text is secure because SSL is required when Exchange Online is the email server.

  6. In the Server field, type the complete URL for the outgoing email server in the Exchange Web Services (EWS) URL format (EWS/exchange.asmx). The current URL is:
    https://outlook.office365.com/EWS/Exchange.asmx
    Tip Instead of typing a URL, you can select the Use Autodiscover option to use the Autodiscover service to obtain the Exchange Web Services URL.

  7. In the Access Credentials list, select how the email router will gain access to the Exchange Online server. By default, if you are using Microsoft Dynamics CRM Online, Other Specified will be selected and dimmed.
    Note If you are using an on-premises version of Microsoft Dynamics CRM, you can select User Specified. If you select this option, each Microsoft Dynamics CRM user must follow these steps to grant the email router access to the Exchange mailbox:

    1. Open the Microsoft Dynamics CRM web client.

    2. On the File menu, click Options.

    3. In the Set Personal Options dialog box, click the E-mail tab.

    4. Select Allow E-Mail Router to use my credentials to send and receive e-mail on my behalf.

    5. Have the user type his or her user name and password.

  8. Type the user name and password that the email router will use to send email messages from Microsoft Dynamics CRM by using the Exchange Online account for that Microsoft Dynamics CRM user. The credentials can be either those of the Exchange Online user or those of the Exchange Online tenant administrator. Type the user name in the username@fulldomain.com format. (For example, type user@mydomain.onmicrosoft.com.)
    Note If you select Administrator as the user type, you must select either Delegate Access or Send As permission as the access type. Delegate Access causes email messages to be sent as 'Send on behalf of' messages. Send As permission causes email messages to be sent as 'Send As' messages.
    Important The credentials that are specified in the outgoing profile must have 'PublishingEditor' permissions (Delegate Access) or Send As permissions on the Exchange Online mailboxes that have to be accessed. Exchange Online administrators and users do not have these permissions by default. To add delegate permissions, Full Access permissions must be granted to the user in the outgoing profile. Send As permissions must be granted to the user in the Outgoing Profile. These permissions must be added through Windows PowerShell. For more information, go to the following websites:

    Connect Windows PowerShell to the Service
    Give an Administrator the Ability to Open and View the Contents of a User's Mailbox
    Give Users Send As Permission
    Note If a user account does not have the appropriate permissions to send email messages on behalf of or as the Microsoft Dynamics CRM users, an outgoing profile will have to be created for each user and set to Other Specified for Access Credentials. In this case, each user's credentials must be set within his or her own outgoing profile. Additionally, each user account must be configured to the outgoing profile that is specific to his or her 'user/queue' account on the Users and Queues tab in the email router.

  9. Click OK.

  10. In E-mail Router Configuration Manager, click Publish.

Note When Delegate permissions are used in the email router, users must be set up to enable the email router to 'send as' or 'send on behalf of' the owner of the mailbox. To do this, follow these steps:

  1. Open the Microsoft Dynamics CRM web client.

  2. ClickOn the File menu, click Options.

  3. In the Set Personal Options dialog box, click the E-mail tab.

  4. Select Allow other Microsoft Dynamics CRM users to send email on your behalf.

How to configure an incoming profile

To configure an incoming profile for Exchange Online, follow these steps:

  1. Start the E-mail Router Configuration Manager. To do this, click Start, click All Programs, click Microsoft Dynamics CRM 2011 E-mail Router, and then click Microsoft Dynamics CRM E-mail Router Configuration.

  2. Click Configuration Profiles, and then click New.

  3. In the E-mail Router Configuration Profile dialog box, type a profile name. For example, type Incoming Email.

  4. For the direction, select Incoming.

  5. For the email server type, select Exchange Online. The value for Protocol automatically changes to Exchange Web Services, and the value for Authentication Type automatically changes to Clear Text.
    Important Clear Text is secure because SSL is required when Exchange Online is the email server.

  6. In the Server field, type the complete URL for the incoming email server in the Exchange Web Services (EWS) URL format (EWS/exchange.asmx). The current URL is: https://outlook.office365.com/EWS/Exchange.asmx.
    Tip Instead of typing a URL, you can select the Use Autodiscover option to use the Autodiscover service to obtain the Exchange Web Services URL.

  7. Click OK.

  8. In the E-mail Router Configuration Manager, click Publish.