Outlook/Exchange MAPI questions
Hi All
This is my understanding of how Outlook works with Exchange in terms of MAPI:
When Exchange mailbox receives a new email, it will send a UDP notification packet to the MAPI client of the user. Outlook will then take a copy of the message from Exchange and display in Outlook.
Whereas in cached Exchange mode, there is no MAPI UDP notification, Outlook just polls Exchange regularly to find out if there are any new messages?
Would that be correct? What I dont' understand is why Exchange uses UDP for the notification? Since this is connectionless, there is a chance that the packet may not reach there and Exchange won't resend? In that case what happens?
Bearing that in mind, why not use TCP?
June 21st, 2010 8:24pm
Hi,
In cached Exchange mode, the MAPI thread that monitors the new mail notification exits when it receives a User Datagram Protocol (UDP) packet on the termination port. Then it will
update folder views and download a copy of the message from exchange to a local OST file.
In online Exchange mode, the MAPI thread also uses the UDP to receive new e-mail message notifications, but it just update folder views. When trying to view a message, outlook will retrieve the data from exchange server.
This is major difference between cached mode and online mode.
Why use UDP, not TCP:
UDP is faster than TCP. So it is commonly used for new message notification. The reason UDP is faster than TCP is because there is no form of flow control or error correction.
TCP is the most commonly used protocol on the Internet. The reason for this is because TCP offers error correction. When the TCP protocol is used there is a "guaranteed delivery."
This is due largely in part to a method called "flow control." Flow control determines when data needs to be re-sent, and stops the flow of data until previous packets are successfully transferred. This works because if a packet of data is sent, a collision
may occur. When this happens, the client re-requests the packet from the server until the whole packet is complete and is identical to its original.
Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2010 10:15am
Hi Thomas
Thanks for answering...
Now I understand why MAPI uses UDP! Just one more question if that's ok -
Let's say someone recvs a new mail to their Exchange mailbox. Exchange sends a UDP notification to Outlook, but for whatever reason the packet is lost. So Outlook doesn't know that the message was recvd to the Exchange mailbox. Is there any form of regular
'rescan' to minimise the disruption caused by this? As otherwise surely Outlook will not try to retrieve the message until the next time it actually recvs another UDP notification?
Thanks again
July 1st, 2010 9:56pm
On Thu, 1 Jul 2010 18:56:19 +0000, Pancamo wrote:
>
>
>Hi Thomas
>
>Thanks for answering... Now I understand why MAPI uses UDP! Just one more question if that's ok -
>
>Let's say someone recvs a new mail to their Exchange mailbox. Exchange sends a UDP notification to Outlook, but for whatever reason the packet is lost. So Outlook doesn't know that the message was recvd to the Exchange mailbox. Is there any form of regular
'rescan' to minimise the disruption caused by this? As otherwise surely Outlook will not try to retrieve the message until the next time it actually recvs another UDP notification?
Clients are sent a UDP packet every 60 seconds (I think that's the
interval) as long as there are unread message in any folder.
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2010 5:08am
>Clients are sent a UDP packet every 60 seconds (I think that's the
>interval) as long as there are unread message in any folder.
Ah ok - so Exchange 'knows' that Outlook hasn't responded to that initial UDP notification and sends another one at 60s intervals after that?
So if Outlook HAD responded to Exchange, that second 60s UDP packet wouldn't be sent?
Thanks for answering my questions :)
July 2nd, 2010 9:57pm
On Fri, 2 Jul 2010 18:57:21 +0000, Pancamo wrote:
>>Clients are sent a UDP packet every 60 seconds (I think that's the >interval) as long as there are unread message in any folder.
>Ah ok - so Exchange 'knows' that Outlook hasn't responded to that initial UDP notification and sends another one at 60s intervals after that?
Exchange doesn't care. There's no "reponse" expected. That UDP is just
a notification to Outlook, nothing more.
>So if Outlook HAD responded to Exchange, that second 60s UDP packet wouldn't be sent?
The server will send a UDP packet to the client every 60 seconds as
long as there are unread messages in the mailbox.
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2010 3:56am
Hi,
Does exchange server 2010 still sends UDP notifications to outlook 2010? or it has changed.
Thanks
July 20th, 2010 9:06pm
On Tue, 20 Jul 2010 18:06:07 +0000, dkool wrote:
>Does exchange server 2010 still sends UDP notifications to outlook 2010? or it has changed.
If it didn't then earlier Outlook clients wouldn't work as expected.
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
July 21st, 2010 2:37am
On Tue, 20 Jul 2010 18:06:07 +0000, dkool wrote:
>Does exchange server 2010 still sends UDP notifications to outlook 2010? or it has changed.
If it didn't then earlier Outlook clients wouldn't work as expected.
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Actually, Outlook 2007 and 2010 uses the Async RPC model for notifications, not UDP. Exchange 2010 no longer sends UDP notifications to any client. There's a good writeup of this here:
http://blog.kazmarek.com/2010/06/02/outlook-2003-connected-to-exchange-2010-gives-unknown-error-when-deleting-some-messages/
September 20th, 2010 1:14pm
On Mon, 20 Sep 2010 17:11:19 +0000, Stephen Griffin - MSFT wrote:
>On Tue, 20 Jul 2010 18:06:07 +0000, dkool wrote: >Does exchange server 2010 still sends UDP notifications to outlook 2010? or it has changed. If it didn't then earlier Outlook clients wouldn't work as expected. --- Rich Matheisen MCSE+I, Exchange MVP
>--- Rich Matheisen MCSE+I, Exchange MVP
>
>Actually, Outlook 2007 and 2010 uses the Async RPC model for notifications, not UDP. Exchange 2010 no longer sends UDP notifications to any client. There's a good writeup of this here:
>
>http://blog.kazmarek.com/2010/06/02/outlook-2003-connected-to-exchange-2010-gives-unknown-error-when-deleting-some-messages/
Almost every day I learn something! Thanks. I don't recall reading
that, but that doesn't surprise me anymore. :-)
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
September 20th, 2010 7:56pm