mail flow and transport deep dive

80
park the future. May 4 – 8, 2015 Chicago, IL

Upload: lylien

Post on 03-Jan-2017

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Mail flow and transport deep dive

Spark the future.May 4 – 8, 2015

Chicago, IL

Page 2: Mail flow and transport deep dive

Mail Flow and Transport Deep DiveKhushru IraniProgram ManagerTransport Team, O365

BRK3160

Page 3: Mail flow and transport deep dive

Session Objectives And TakeawaysExchange 2010 vs. Exchange 2016 transportTransport components shipping with Exchange 2016Mail Routing ScenariosTransport High AvailabilityMail flow in Office 365

Page 4: Mail flow and transport deep dive

Exchange 2010 vs. Exchange 2016 transport

Page 5: Mail flow and transport deep dive

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP

Internet

Site BSite A

Exchange 2010 Si

te B

ound

ary

Page 6: Mail flow and transport deep dive

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP

Internet

Site B MAPISite A

Exchange 2010 Si

te B

ound

ary

Page 7: Mail flow and transport deep dive

Mail Delivery Overview

DAG

MBX

HUB HUB

Internet

Site B

SMTP

Site A

Exchange 2010 Si

te B

ound

ary

Page 8: Mail flow and transport deep dive

Mail Delivery Overview

DAG

MBX

HUB HUB

Internet

Site B

SMTP

SMTP

Site A

Exchange 2010 Si

te B

ound

ary

Page 9: Mail flow and transport deep dive

Mail Delivery Overview

DAG

MBX

HUB HUB

Internet

Site B MAPI

SMTP

SMTP

Site A

Exchange 2010 Si

te B

ound

ary

Page 10: Mail flow and transport deep dive

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP

Internet

Site B MAPI

SMTP

SMTP

Site A

Exchange 2010 Si

te B

ound

ary

Page 11: Mail flow and transport deep dive

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP

DAG

Transport

SMTP

Internet

Site B MAPI

SMTP

SMTP

Site A

Internet

Transport

MBX

Exchange 2010 Exchange 2016

Site A

Site B

Site

Bou

ndar

y

Site

Bou

ndar

y

Mailbox Transport

Mailbox Transport

Frontend Transport Frontend Transport

Page 12: Mail flow and transport deep dive

DAG

Transport

SMTP

Transport

MBX

Site A

Site B

Site

Bou

ndar

y

Mailbox Transport

Mailbox Transport

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP SMTP

Internet

Site B MAPI

SMTP

SMTP

Site A

Internet

Exchange 2010 Exchange 2016

SMTP

Site

Bou

ndar

y

Frontend Transport Frontend Transport

Page 13: Mail flow and transport deep dive

DAG

Transport

SMTP

Transport

MBX

Site A

Site B

Site

Bou

ndar

y

Mailbox Transport

Mailbox Transport

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP SMTP

Internet

Site B MAPI

SMTP

SMTP

Site A

Internet

Exchange 2010 Exchange 2016

SMTP

Site

Bou

ndar

y

SMTP

MAPI

Frontend Transport Frontend Transport

Page 14: Mail flow and transport deep dive

DAG

Transport

SMTP

Transport

MBX

Site A

Site B

Site

Bou

ndar

y

Mailbox Transport

Mailbox Transport

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP SMTP

Internet

Site B MAPI

SMTP

SMTP

Site A

Internet

Exchange 2010 Exchange 2016

SMTP

Site

Bou

ndar

y

SMTP

MAPI

Frontend Transport Frontend Transport

Page 15: Mail flow and transport deep dive

DAG

Transport Transport

MBX

Site A

Site B

Site

Bou

ndar

y

Mailbox Transport

Mailbox Transport

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP

Internet

Site B MAPI

SMTP

SMTP

Site A

Internet

Exchange 2010 Exchange 2016 Si

te B

ound

ary

SMTP

Frontend Transport Frontend Transport

Page 16: Mail flow and transport deep dive

DAG

Transport Transport

MBX

Site A

Site B

Site

Bou

ndar

y

Mailbox Transport

Mailbox Transport

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP

Internet

Site B MAPI

SMTP

SMTP

Site A

Internet

Exchange 2010 Exchange 2016 Si

te B

ound

ary

SMTP

SMTP

Frontend Transport Frontend Transport

Page 17: Mail flow and transport deep dive

DAG

Transport Transport

MBX

Site A

Site B

Site

Bou

ndar

y

Mailbox Transport

Mailbox Transport

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP

Internet

Site B MAPI

SMTP

SMTP

Site A

Internet

Exchange 2010 Exchange 2016 Si

te B

ound

ary

SMTP

SMTP

SMTPMAPI

Frontend Transport Frontend Transport

Page 18: Mail flow and transport deep dive

DAG

Transport

MBX

Site A

Site B

Site

Bou

ndar

y

Mailbox Transport

Mail Delivery Overview

DAG

MBX

HUB HUB

SMTP

Internet

Site B MAPI

SMTP

SMTP

Site A

Internet

Exchange 2010 Exchange 2016 Si

te B

ound

ary

SMTP

SMTP

SMTP

SMTP

TransportMailbox

Transport

SMTP

MAPI

Frontend Transport Frontend Transport

SMTP

Page 19: Mail flow and transport deep dive

Mail Submission Overview

DAG

HUB HUB

Internet

Exchange 2010

NotifyMAPIMBX

Sub Sub

Page 20: Mail flow and transport deep dive

Mail Submission Overview

DAG

HUB HUB

Internet

MAPI

Exchange 2010

NotifyMAPIMBX

Sub Sub

Page 21: Mail flow and transport deep dive

Mail Submission Overview

DAG

HUB HUB

SMTP

Internet

MAPI

Exchange 2010

NotifyMAPIMBX

Sub Sub

Page 22: Mail flow and transport deep dive

Mail Submission Overview

DAG

Transport

Internet

Transport

MBX

Frontend Transport

Exchange 2016

MAPI

Mailbox Transport

Mailbox Transport

DAG

HUB HUB

SMTP

Internet

MAPI

Exchange 2010

NotifyMAPIMBX

Sub Sub

Frontend Transport

Page 23: Mail flow and transport deep dive

Mail Submission Overview

DAG

Transport

Internet

Transport

MBX

Frontend Transport

Exchange 2016

MAPI

Mailbox Transport

Mailbox Transport

DAG

HUB HUB

SMTP

Internet

MAPI

Exchange 2010

NotifyMAPIMBX

Sub Sub

Frontend Transport

SMTP

Page 24: Mail flow and transport deep dive

Mail Submission Overview

DAG

Transport

Internet

Transport

MBX

Frontend Transport

Exchange 2016

MAPI

Mailbox Transport

Mailbox Transport

DAG

HUB HUB

SMTP

Internet

MAPI

Exchange 2010

NotifyMAPIMBX

Sub Sub

Frontend Transport

SMTP

SMTP

SMTP

Page 25: Mail flow and transport deep dive

Transport Components in Exchange 2016

Page 26: Mail flow and transport deep dive

Transport componentsTransport ships 3 major components in Exchange 2016Frontend Transport – Stateless SMTP serviceTransport – Stateful SMTP serviceMailbox Transport – Stateless SMTP service

Transport responsibilities (unchanged)Receive and deliver all inbound mail to the organization Submit and deliver all outbound mail from the organizationPerform all message processing within the pipelineSupport extensibility within pipelineKeep messages redundant until successfully delivered

Page 27: Mail flow and transport deep dive

Handles inbound and outbound external SMTP traffic

(Does not replace the Edge Transport Server Role)

Listens on TCP25 and TCP587 and TCP717. Supports TLS 1.0, 1.1 and 1.2.Handles authenticated client submissions Functions as a layer 7 proxy and has full access to protocol conversation (inbound)Will not queue or bifurcate mail locallySet FrontendProxyEnabled parameter of the Set-SendConnector using Powershell to route Outbound mail via Frontend transport

Frontend Transport

Frontend Transport

SMTP Receive Protocol

Agents

SMTP from Transport Service

Authenticated

SMTP

SMTP Send

SMTP to Transport Service

External SMTP

Mailbox Selector

:25

:717

MSExchangeFrontendTransport.exe

:587

AnonymousSMTP

Page 28: Mail flow and transport deep dive

Benefits of Frontend TransportCentralized, load balanced egress/ingress point for the organizationMailbox locator – determines the DAG to deliver the message to (prefers a Mailbox server in its own site)Provides unified namespace, for authenticated and anonymous mailflow scenariosScales based on number of connectionsSupports various SMTP extensibility points

Page 29: Mail flow and transport deep dive

Processes all SMTP mail flow for the organizationWill queue and route messages in and out of the organizationPerforms content inspectionSupports extensibility in SMTP and categorizerListens on TCP2525 (since Frontend Transport is listening on TCP 25)

*previously known as Hub Transport

Transport*

Transport

SMTP to MBX-Transport

Delivery

SMTP from MBX-Transport Submission

SMTP from Frontend

Transport & Transport

SMTP to Frontend Transport & Transport

Delivery Agents

*other protocols

Delivery Queue

Delivery Queue

Pickup/Replay

CategorizerRouting Agents

SMTP SendSMTP Receive

Protocol Agents

:2525

:252 5

Edgetransport.exe

Mail.que

Submission Queue

Page 30: Mail flow and transport deep dive

Transport Pipeline

Categorizer

ResolveRecipients

SMTP Send

SMTP ReceiveProtocol Agents

:252 5

Mail.que

Submission Queue

Find Route for Recipient

Content Conversion

& Bifurcation

On Submitted

On Resolved

On Routed On Categorized

External Delivery Queue

Internal Delivery Queue

Mailbox Delivery Queue

• All incoming mail is stored in the mail.que database• All mail passes through the various stages of the categorizer • There is exactly one submission queue but multiple delivery

queues (one per destination)• Agents subscribe to various events along the pipeline – Transport

rules agent; Journaling agent; Malware agent; 3rd party agents

Page 31: Mail flow and transport deep dive

Benefits of TransportPerforms all routing decisions for internal and external messagesProvides an extensibility platform for third-party agents to operate within the pipelineAllows messages to be routed in or out through connectors for special handlingProtects messages by making messages highly available on ‘shadow’ servers

Page 32: Mail flow and transport deep dive

Handles mail submission and delivery from/to Store using two separate processesDoes not have persistent storagePerforms MIME to MAPI conversion (and vice versa)Combines Mailbox Assistant and Store Driver functionality

(Supports all E2010 store driver extensibility events)

Leverages local RPC for delivery to and submission from StoreDoes not support any extensibility

Mailbox TransportSMTP from Transport

Mailbox TransportSMTP SendSMTP

Receive

SubmissionMailbox

Assistants

MAPI MAPI

Store

SMTP to Transport

:475

MSExchangeDelivery.exe MSExchangeSubmission.exe

SMTP Send

Deliver Agents

Delivery

SMTP to Transport

Page 33: Mail flow and transport deep dive

Benefits of Mailbox TransportBrings together all transport scenarios that access mailbox store under one componentHelps realize the “every server is an island” vision by ensuring MAPI is not used across the serverSimplifies handling of mailbox DB *over scenarios

Page 34: Mail flow and transport deep dive

AD

Web browserOutlook (remote

user)

Mobile phone

Outlook (local user)

ExternalSMTP

servers

Exchange Online

Protection

Enterprise Network

Load

Bal

ance

r

Exchange 2016 Server Role Architecture

DAG2

MBX

MBX

MBX

DAG3

MBX

MBX

MBX

DAG1

MBX

MBX

MBX

Page 35: Mail flow and transport deep dive

AD

Web browserOutlook (remote

user)

Mobile phone

Outlook (local user)

ExternalSMTP

servers

Exchange Online

Protection

Enterprise Network

Load

Bal

ance

r

Exchange 2016 Server Role Architecture

DAG2

MBX

MBX

MBX

DAG3

MBX

MBX

MBX

DAG1

MBX

MBX

MBX

…Frontend Transport

Frontend Transport

Frontend Transport

Frontend Transport

Frontend Transport

Frontend Transport

Frontend TransportFrontend Transport

Frontend Transport

Page 36: Mail flow and transport deep dive

AD

Web browserOutlook (remote

user)

Mobile phone

Outlook (local user)

ExternalSMTP

servers

Exchange Online

Protection

Enterprise Network

Load

Bal

ance

r

Exchange 2016 Server Role Architecture

DAG2

MBX

MBX

MBX

DAG3

MBX

MBX

MBX

DAG1

MBX

MBX

MBX

…Frontend Transport

Mailbox Transport

Transport

1. Email enters the organization

2. Frontend Transport accepts the mail

3. Frontend Transport determines DAG for this recipient

4. Frontend Transport sends mail to a MBX server in the recipients DAG [prefers MBX server in its own site]

5. Transport service receives mail & delivers to MBX transport

1

23

4

5

Page 37: Mail flow and transport deep dive

AD

Web browserOutlook (remote

user)

Mobile phone

Outlook (local user)

ExternalSMTP

servers

Exchange Online

Protection

Enterprise Network

Load

Bal

ance

r

Exchange 2016 Server Role Architecture

DAG2

MBX

MBX

MBX

DAG3

MBX

MBX

MBX

DAG1

MBX

MBX

MBX

Edge Transport 2016

Used in perimeter network (non-domain joined) to accept mail

Same feature set as Edge role in 2010

New monitoring framework (like rest of Exchange 2013)

No AV; basic Anti-spam features; No Shadow copy

Client submission traffic doesn’t use Edge

Edge Transport

Page 38: Mail flow and transport deep dive

Mail routing scenarios

Page 39: Mail flow and transport deep dive

Scenario 1 – Incoming mail on a single mailbox server Scenario 2 – Incoming mail to two recipients Scenario 3 – Originating mail to Internet Scenario 4 – Originating mail to multiple recipients

Mail routing scenarios

Page 40: Mail flow and transport deep dive

Frontend Transport will attempt to anchor on a recipient

Frontend Transport will lookup recipient in AD & find a DAG that recipient belongs to

Frontend Transport will attempt to route mail to a mailbox server in that DAG (preferably in the same site as the CAS server)

Routing Overview

Page 41: Mail flow and transport deep dive

DAG

Internet

Server

1 – Incoming mail on multi-role serverFrontend Transport receives message on port 25... looks up where recipient’s mailbox exists and routes to a Transport service within the DAG for that mailboxTransport receives message on port 2525… processes it and routes it to mailbox transport delivery on server where mailbox is activeMailbox Transport Delivery receives the message on port 475… converts MIME to MAPI and delivers message to Store.

MBX 2016Frontend Transport

Store

Transport

Mailbox Transport

Page 42: Mail flow and transport deep dive

Scenario 1 – Protocol flow

Internet Frontend Transport

EHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA

Page 43: Mail flow and transport deep dive

Scenario 1 – Protocol flow

Internet Frontend Transport Transport

EHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA (TLS Session)EHLO

XPROXYFROM

MAIL FROM

250 OK

RCPT TO

250 OK

DATA250 OK

(EXCHANGEAUTH)250 OK

250 OK

Page 44: Mail flow and transport deep dive

Scenario 1 – Protocol flow

Internet Frontend Transport Transport

EHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA (TLS Session)EHLO

XPROXYFROM

MAIL FROM

250 OK

RCPT TO

250 OK

DATA250 OK

(EXCHANGEAUTH)250 OK

250 OK

250 OKQUIT

Page 45: Mail flow and transport deep dive

Scenario 1 – Protocol flow

Internet Frontend Transport Transport

EHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA (TLS Session)EHLO

XPROXYFROM

MAIL FROM

250 OK

RCPT TO

250 OK

DATA250 OK

(EXCHANGEAUTH)250 OK

250 OK

250 OKQUIT QUIT

Page 46: Mail flow and transport deep dive

Scenario 1 – Protocol flow

TransportMailbox

Transport

(TLS Session)EHLO

MAIL FROM

250 OKRCPT TO

250 OK

DATA250 OKQUIT

XSESSIONSPARAMS(EXCHANGEAUTH)

250 OK

250 OK

Page 47: Mail flow and transport deep dive

Scenario 1 – Protocol flow

Internet Frontend Transport Transport

EHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA (TLS Session)EHLO

XPROXYFROM

MAIL FROM

250 OK

RCPT TO

250 OK

DATA250 OK

(EXCHANGEAUTH)250 OK

250 OK

250 OKQUIT QUIT

MailboxTransport

(TLS Session)EHLO

MAIL FROM

250 OKRCPT TO

250 OK

DATA250 OKQUIT

XSESSIONSPARAMS(EXCHANGEAUTH)

250 OK

250 OK

Page 48: Mail flow and transport deep dive

Scenario 1 – Received headersReceived: from EXHV-1889.EXHV-5245dom.extest.microsoft.com (2001:4898:e8:3050:d9f3:8ace:7a2f:900b) by EXHV-1889.EXHV-5245dom.extest.microsoft.com (2001:4898:e8:3050:d9f3:8ace:7a2f:900b) with Microsoft SMTP Server (TLS) id 15.0.620.3 via Mailbox Transport; Sun, 27 Jan 2013 11:50:14 -0800Received: from EXHV-1889.EXHV-5245dom.extest.microsoft.com (2001:4898:e8:3050:d9f3:8ace:7a2f:900b) by EXHV-1889.EXHV-5245dom.extest.microsoft.com (2001:4898:e8:3050:d9f3:8ace:7a2f:900b) with Microsoft SMTP Server (TLS) id 15.0.620.3; Sun, 27 Jan 2013 11:50:13 -0800Received: from Internet (172.18.140.30) by EXHV-1889.EXHV-5245dom.extest.microsoft.com (10.176.198.88) with Microsoft SMTP Server (TLS) id 15.0.620.3 via Frontend Transport; Sun, 27 Jan 2013 11:50:10 -0800Subject: Incoming mail on all-in-one roleMessage-ID: <[email protected]>From: <[email protected]>

Page 49: Mail flow and transport deep dive

DAG

Internet

2 – Incoming mail to two recipients

MBX 2016Frontend Transport

Store

Transport

Mailbox Transport

MBX 2016Frontend Transport

Store

Transport

Mailbox Transport

2 Recipients

Site

Bou

ndar

y

Page 50: Mail flow and transport deep dive

Internet

DAG

3 – Originating mail to Internet

MBX 2016

Frontend Transport

Store

Transport

Mailbox Transport

MBX 2016

Frontend Transport

Store

Transport

Mailbox Transport

Page 51: Mail flow and transport deep dive

Scenario 3 – Protocol flowEHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA

250 OK

(TLS Session)

QUITTransportMailbox Transport

(EXCHANGEAUTH)

Page 52: Mail flow and transport deep dive

Scenario 3 – Protocol flow

250 OK

(TLS Session)

EHLO

250 OK

MAIL FROM250 OK

RCPT TO250 OK

DATA250 OK

QUITQUIT

XPROXYTO

MAIL FROM

250 OKRCPT TO

250 OKDATA

250 OK

Internet Frontend Transport Transport

Page 53: Mail flow and transport deep dive

Scenario 3 – Protocol flow

250 OK

(TLS Session)

EHLO

250 OK

MAIL FROM250 OK

RCPT TO250 OK

DATA250 OK

QUITQUIT

XPROXYTO

MAIL FROM

250 OKRCPT TO

250 OKDATA

250 OK

Internet Frontend Transport Transport

Mailbox Transport

EHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA

250 OK

(TLS Session)

QUIT

(EXCHANGEAUTH)

Page 54: Mail flow and transport deep dive

Internet

DAG 2MBX 2016

Frontend Transport

Transport

Store

Mailbox Transport

DAG 1

4 – Originating mail to multiple recipients

MBX 2016Frontend Transport

Store

Transport

Mailbox Transport

MBX 2016Frontend Transport

Store

Transport

Mailbox Transport

3 Recipients

Site

Bou

ndar

y

Page 55: Mail flow and transport deep dive

Transport high availability

Page 56: Mail flow and transport deep dive

Shadow is done ONLY by the Transport service Every message is redundantly persisted (shadowed) before its

receipt is acknowledged to the sender If shadow can’t be made, Transport service will reject sender

with 450 4.5.1 Transport service will first attempt to shadow to an active

server in another site (but in the same DAG); after which will try to shadow to any active server in DAG

Shadow server will periodically check with the primary server for a heartbeat; if no heartbeat for 3 hours, it will send message on behalf of primary

Duplicate delivery detection present in store; in case primary resends message

Shadow Messages

Page 57: Mail flow and transport deep dive

DAG

Internet

All messages to Transport are shadowed

MBX 2016

Frontend Transport

Store

Transport

Mailbox Transport

MBX 2016

Frontend Transport

Store

Transport

Mailbox Transport

S SSM TP

Site

Bou

ndar

y

Page 58: Mail flow and transport deep dive

Transport service redundantly store all mail for a configured time span to protect against irrecoverable mailbox failures

Now has a “shadow” equivalent and is no longer a SPOF Consolidates and improves E2010 Transport Dumpster

functionality Safety Net retains data for a set period of time, regardless of

whether the message has been successfully replicated to all database copies or delivered to final destination

Processes replay requests by resubmitting messages from “primary” or “shadow” Safety Net for mailbox fail overs or lag restores

To see various shadow & safety net values: get-transportconfig | fl *Shadow*,*safety* [ShadowHeartbeatFrequency; ShadowResubmitTimeSpan; SafetyNetHoldTime]

Safety net

Page 59: Mail flow and transport deep dive

Scenario 1 – Protocol flow

Internet Frontend Transport Transport

EHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA (TLS Session)EHLO

XPROXYFROM

MAIL FROM

250 OK

RCPT TO

250 OK

DATA250 OK

(EXCHANGEAUTH)250 OK

250 OK

250 OKQUIT QUIT

Page 60: Mail flow and transport deep dive

Scenario 1 – Protocol flow with shadow

Internet Frontend Transport Transport

EHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA (TLS Session)EHLO

XPROXYFROM

MAIL FROM

250 OK

RCPT TO

250 OK

DATA

(EXCHANGEAUTH)250 OK

250 OK

Transport(MBX Svr1)

Page 61: Mail flow and transport deep dive

Scenario 1 – Protocol flow with shadow

Internet Frontend Transport Transport

EHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA (TLS Session)EHLO

XPROXYFROM

MAIL FROM

250 OK

RCPT TO

250 OK

DATA

(EXCHANGEAUTH)250 OK

250 OK

Transport(MBX Svr1)

Transport(MBX Svr2)

(TLS Session)

EHLO

MAIL FROM

250 OK

RCPT TO

250 OK

DATA

(EXCHANGEAUTH)

XSHADOWREQUEST

250 OK

QUIT

Page 62: Mail flow and transport deep dive

Scenario 1 – Protocol flow with shadow

Internet Frontend Transport Transport

EHLO

250 OK

MAIL FROM

250 OK

RCPT TO

250 OK

DATA (TLS Session)EHLO

XPROXYFROM

MAIL FROM

250 OK

RCPT TO

250 OK

DATA

(EXCHANGEAUTH)250 OK

250 OK

Transport(MBX Svr1)

Transport(MBX Svr2)

(TLS Session)

EHLO

MAIL FROM

250 OK

RCPT TO

250 OK

DATA

(EXCHANGEAUTH)

XSHADOWREQUEST

250 OK

QUIT250 OK250 OKQUIT QUIT

Page 63: Mail flow and transport deep dive

Shadow Message – SMTP ‘ping’

Transport(MBX Svr1)

Transport(MBX Svr2)

(TLS Session)

EHLO

(EXCHANGEAUTH)

XSHADOW

QUIT

XQDISCARD

250 OK (MSG ID)

250 OK (MSG ID)

250 OK

(TLS Session)

EHLO

(EXCHANGEAUTH)

XSHADOW

QUIT

XQDISCARD

250 OK (MSG ID)

250 OK

Page 64: Mail flow and transport deep dive

Message Tracking Log

Frontend Transport

Transport

Transport

MBX Transport

SMTP ReceiveSMTP

Send

SMTPHARedirect

SMTP HAReceive

SMTP HADiscard

Storedriver Deliver

Store

MBX SVR 01

MBX SVR 03

MBX SVR 02

1

2 2

3

3

Frontend Transport

Transport

Transport

MBX Transport

SMTP Send

SMTP Receive

SMTPHARedirect

SMTP HAReceive

SMTP HADiscard

Storedriver

Receive

Store

MBX SVR 01

MBX SVR 03

MBX SVR 02

3

3 2

2

1

Storedriver Submit

Message Delivery

Message Submission

Page 65: Mail flow and transport deep dive

Mail flow in Office 365

Page 66: Mail flow and transport deep dive

New Connector Wizard UI experience + Outbound connector validation support (validate your connector before you turn it ON) BRK3159: Using Connectors And Mail Routing

Max message size is now 150MB It used to be 25MB (still the default) Message size is configurable (it can also decreased) You can do this per mailbox or configure it for all new mailboxes http://blogs.office.com/2015/04/15/office-365-now-supports-larger-emai

l-messages-up-to-150-mb/

Support for SMTP using TLS 1.2 Removed support for SSL 3.0 (and in the coming months RC4)

Enhanced NDRs (more precise, better fix it steps and better looking) http://blogs.office.com/2015/04/17/enhanced-non-delivery-reports-ndrs-in-office-365/

What’s New in Mail flow in Office 365

Page 67: Mail flow and transport deep dive

Enhanced NDRs in Office 365

Page 68: Mail flow and transport deep dive

Hybrid - Before the move to O365

Contoso.com

MX Record

From: [email protected]: [email protected]

contoso.com      MX preference = 20, mail exchanger = mail.contoso.comcontoso.com      MX preference = 10, mail exchanger = mailbackup.contoso.com mail.contoso.com internet address = 78.35.15.8mailbackup.contoso.com    internet address = 78.35.15.9

Page 69: Mail flow and transport deep dive

Hybrid

Contoso.comContoso.co

mContoso.com is registered as an accepted domain

MX Record

contoso.com MX preference = 10, mail exchanger = contoso-com.mail.protection.outlook.com

contoso-com.mail.protection.outlook.com internet address = 207.46.163.170contoso-com.mail.protection.outlook.com internet address = 207.46.163.215contoso-com.mail.protection.outlook.com internet address = 207.46.163.247

Move MX to point to O365 (preferred method, since it avoids many issues with SPF, DKIM, DMARC, etc.)

Add domain contoso.com in O365 and verify you own the domain by adding a txt record (at DNS provider)

Add users you want to host in O365

Region based IPs

Page 70: Mail flow and transport deep dive

Hybrid – Primary reason for having connectors

Contoso.comContoso.co

m

You want one happy family organization

Cloud + On-premises appear as one organization (Exchange headers are retained between the two)

MX Record

Contoso.com is registered as an accepted domain

Page 71: Mail flow and transport deep dive

Hybrid – Connector From O365 To Your Org

Contoso.com

MX Record

Contoso.comContoso.com is

registered as an accepted domain

Connector (Direction of mail flow)From: O365To: Your organization servers(PSH: Outbound On-premise Connector)For all Accepted domainsPoint to your organization’s smarthost

Receive Connector(Firewall to accept mails from mail.protection.microsoft.com IPs)

Page 72: Mail flow and transport deep dive

Hybrid – Connector From O365 To Your Org

Contoso.com

From: [email protected]: [email protected]

MX Record

Contoso.comContoso.com is

registered as an accepted domain

From: [email protected]: [email protected]

Receive Connector(Firewall to accept mails from mail.protection.microsoft.com IPs)

Connector (Direction of mail flow)From: O365To: Your organization servers(PSH: Outbound On-premise Connector)For all Accepted domainsPoint to your organization’s smarthost

Page 73: Mail flow and transport deep dive

Hybrid – Mail queued to your org smart hostYou will see a Message Center post + an email notification to your admin

Page 74: Mail flow and transport deep dive

Hybrid – Connector From Your Org To O365

Contoso.comContoso.co

mContoso.com is registered as an accepted domain

From: [email protected]: [email protected]

Send Connector(All mail goes via smarthost contoso-com.mail.protection.outlook.com)Connector (Direction of mail flow)From: Your organization serversTo: O365(PSH: Inbound On-premise Connector)Prove Identity using certificate or IP[Sender domain must match Accepted domain]

Page 75: Mail flow and transport deep dive

Hybrid – Connector From Your Org To O365

Contoso.com

SPF Record

Contoso.comContoso.com is

registered as an accepted domain

Send Connector(All mail goes via smarthost contoso-com.mail.protection.outlook.com)

From: [email protected]: [email protected] "v=spf1 include:spf.protection.outlook.com –

all”

Connector (Direction of mail flow)From: Your organization serversTo: O365(PSH: Inbound On-premise Connector)Prove Identity using certificate or IP[Sender domain must match Accepted domain]

Page 76: Mail flow and transport deep dive

Hybrid – In Summary

Contoso.com

SPF Record

Contoso.comContoso.com is

registered as an accepted domain

MX Record

You create 2 connectors because – You want one happy family

organization Cloud + On-premises appear as one

organization (Exchange headers are retained between the two)

Keep in mind – You MUST have dedicated IPs (those

IPs MUST belong to your organization)

More secure way of proving mail comes from on-premises is TLS using certificate (issued by well-known CA) vs. IPs

Sender domain MUST match accepted domain

Between O365 and your on-premises there MUST be no other service provider

Page 77: Mail flow and transport deep dive

Hybrid – Retain Exchange Internal HeadersFor Mail flow between O365 and your org Exchange Servers

Exchange internal headers are used by some Exchange components (such as DL permission management, calendar). Note: Transport rule no longer requires this.

All Exchange internal headers (X-MS-Exchange-Organization-xxxx) are stripped off by O365 before coming into or leaving from O365

To retain these headers between the two environmentsMailflow In On-premises (Your organization email servers) In O365

On-premises->O365

Ex 2013: Sendconnector(CloudServicesMailEnabled) Ex 2010: RemoteDomain (TrustedMailOutboundEnabled)

UI: “Retain Exchange internal headers”Cmdlet: Inbound connector(CloudServicesMailEnabled)

O365->On-premises

Ex 2013: Default Frontend ReceiveConnector:1. TlsCertificateName <Subjectname>2. TlsDomainCapabilities:mail.protection.outlook.com:AcceptCloudSer

vicesMail Ex 2010: RemoteDomain (TrustedMailInboundEnabled)

Outbound connector(CloudServicesMailEnabled)

Page 78: Mail flow and transport deep dive

Questions

Page 79: Mail flow and transport deep dive

Visit Myignite at http://myignite.microsoft.com or download and use the Ignite Mobile App with the QR code above.

Please evaluate this sessionYour feedback is important to us!

Page 80: Mail flow and transport deep dive

© 2015 Microsoft Corporation. All rights reserved.