Share via


The Story of Message Size Limits and Remote Mailboxes

One of the more common configurations we see administrators implement in Exchange is a message size limit, which will limit the number of recipients on a message, the size of a message, or the size of the attachments within a message that a user can send. These limits are usually put in place to protect the user and the integrity of the overall email system.

Within Exchange these limits can be configured to apply to the entire organization or you can get more granular and apply they at the Connector, Server, or even Recipient level. Click here for more information on setting message size limits in Exchange on-premises.

In this blog we will concentrate on the Limits set at Recipient Level. More specifically we will address what happens to the recipient limits when a mailbox is moved to Exchange Online and how to ensure similar limits are imposed post migration.

There are three main settings that we will focus on :

MaxReceiveSize:

The MaxReceiveSize parameter specifies the maximum size of a message that can be sent to the mailbox. Messages larger than the maximum size are rejected.

In Office 365, you use this parameter to configure the MaxReceiveSize value on existing mailboxes. Use the Set-MailboxPlan cmdlet to change the MaxReceiveSize value for all new mailboxes that you create in the future.

In on-premises Exchange, the default value unlimited indicates the maximum receive size for the mailbox is controlled elsewhere (for example, organization, server, or connector limits).

MaxSendSize :

The MaxSendSize parameter specifies the maximum size of a message that can be sent by the mailbox.

In Office 365, you use this parameter to configure the MaxSendSize value on existing mailboxes. Use the Set-MailboxPlan cmdlet to change the MaxSendSize value for all new mailboxes that you create in the future.

In on-premises Exchange, the default value unlimited indicates the maximum send size for the mailbox is controlled elsewhere (for example, organization, server, or connector limits).

RecipientLimits The RecipientLimits parameter specifies the maximum number of recipients allowed in messages sent by the mailbox.

A valid value is an integer or the value unlimited. The default value is unlimited.

The value unlimited indicates the maximum number of recipients per message for the mailbox is controlled elsewhere (for example, organization, server, or connector limits).

Note

While the send and receive size limits can be changed in Exchange online, the 500 Recipient limit cannot be changed. This is the upper limit that is in place to protect the Exchange Online shared service. Click here for more information on Recipient limits.

 Real World example: 

In this example we will show what would happen if you have a user with a mailbox on-premises with specific recipient limits and you migrated them to Exchange Online.

Before the Migration: Let’s take a quick look at the recipient limit setting on the mailbox before it is migrated

From Exchange Management Shell on-premises run:

 Get-Mailbox <MailboxIdentity> | Format-List MaxReceiveSize,MaxSendSize,RecipientLimits
As you can see, my user “mirela” has 10MB Send and Receive Message limits and she can send to max 5 recipients:

get-mailbox

 

After the Migration: Now let’s look at the same mailbox to see what the recipient limits are after the user is migrated to Exchange Online

From PowerShell connected to Exchange Online run (click here for instructions):

Get-Mailbox <MailboxIdentity> | Format-List MaxReceiveSize,MaxSendSize,RecipientLimits

This Mailbox was moved to Office 365 via a hybrid (remote) move and we can see the new values that apply to Exchange Online Organizations on the Office 365 mailbox. get-mailbox2

After the Migration

Now let’s look at the same Remote Mailbox from on-premises. When a mailbox is moved from on-premises to the cloud it becomes a remote mailbox object type on-premises

From Exchange Management Shell on-premises run:

Get-RemoteMailbox <MailboxIdentity> | Format-List MaxReceiveSize,MaxSendSize,RecipientLimits get-remotemailbox

 

The results are pretty clear that the migration of a mailbox will not retain the limits that were imposed on the recipient in Exchange before the mailbox was migrated in Exchange Online. By default, the send and receive message size limits applied on the mailboxes in Exchange Online is 35 MB. These values can be increased up to 150 MB. Click here for the most recent information on these limits since they are subject to change.

Which limits will be respected

After the migration you can see that there will be different limit on the Remote mailbox on-premises and the corresponding mailbox in Exchange Online. So which limits will be effective? In this case the answer is potentially both of them. If the user Mirela sends a message from the Exchange Online mailbox to another Exchange online mailbox or an external recipient, the cloud limits will apply. This is assuming that the message did not traverse the on-premises server. If Mirela was to send an email to an on-premises recipient or Centralized mail flow was configured, then the on-premises recipient limits would also be applied.

 Real World example #2

To help understand this behavior we will walk through another example scenario.

Suppose Mirela will send an email that contained a 15 MB attachment to a bunch of colleagues of whom has still not had their mailbox moved to Exchange Online. Once the message is sent, Mirela will notice that her email was not delivered to one of the recipients and instead she will see the following message:

This message wasn't delivered to anyone because it's too large. The limit is 10 MB. This message is 15 MB.

Confused as to why the message made it to most but not all of the recipients, Mirela will give the NDR to her administrator:

Remote Server returned '550 5.2.3 RESOLVER.RST.SendSizeLimit.Sender; message too large for this sender'

Usually after a lot of digging the administrator or support  will discover the Max Send Size limit on the AD object (Remote Mailbox) set to 10MB, responsible for NDR.

We can modify /clear these limits from ADSIedit or Active Directory PowerShell Module as these are not available on Set-RemoteMailbox, therefore we cannot do this change from Exchange Management Tools

set-remotemailbox set-remotemailbox2

MaxSendSize in Exchange is the equivalent of submissionContLength in AD mailboxproperties

MaxReceiveSize in Exchange is the equivalent of delivContLength in AD mailboxproperties2

 Real World example #3

We will also get NDRs from on-premises organization because of the 5 Recipient Limit set on Mirela’s remote mailbox when Mirela will send to more than 5 on-premises recipients or to an on-premises DG with more than 5 members, DG that will be expanded on-premises.

Mirela will sends an email to a Distribution Group -  DG1, synced from on-premises that has 6 on-premises members.

 

dg

She receives this NDR message :

This message wasn't delivered to anyone because there are too many recipients. The limit is 5. This message has 6 recipients.

 And she will give again this NDR code to her Administrator:

Remote Server returned '550 5.5.3 RESOLVER.ADR.RecipLimit; too many recipients'

If we do a Get-MessageTrackingLog in the On-Premises Exchange Organization, we can see Recipient Count 6 (DG1 expanded)

 

get-messagetrace

 

Exchange on-premises will throw same NDR when Mirela sends to 6 separate on-premises recipients: Remote Server returned '550 5.5.3 RESOLVER.ADR.RecipLimit; too many recipients'

 

6recipients

 

 

get-mailbox6recipients

We would again change/clear the recipient limit from ADSIedit as this parameter is not available on Set-RemoteMailbox.

 RecipientLimits in Exchange is the equivalent of msExchRecipLimit in AD mailboxproperties3

 

How to list these values from Exchange Management Shell and AD Powershell

You can use these commands to get a list of these limits on remote mailboxes or mailboxes in your organization in Exchange Management Shell:

Check MaxReceiveSize, MaxSendSize, Recipient Limits For All Mailboxes:

$mb= Get-Mailbox -ResultSize unlimited; $mb| Format-Table Name,MaxReceiveSize,MaxSendSize,RecipientLimits

Check all Mailboxes where at least one of these values (MaxReceiveSize, MaxSendSize, Recipient Limits) has non-default values (not Unlimited)

$mb1=Get-Mailbox -ResultSize unlimited | where {($_.MaxReceiveSize -ne "unlimited") -OR ($_.MaxSendSize -ne "un

limited") -OR ($_.RecipientLimits -ne "unlimited")}; $mb1| FT name, max*size, recipientlimits

Check MaxReceiveSize, MaxSendSize, Recipient Limits  Values For All Remote Mailboxes:

$rmb= Get-RemoteMailbox -ResultSize unlimited; $rmb | Format-Table Name,MaxReceiveSize,MaxSendSize,RecipientLimits

Check all Remote Mailboxes where at least one of these values (MaxReceiveSize, MaxSendSize, Recipient Limits) has non-default values (not Unlimited)

$rmb1=Get-RemoteMailbox -ResultSize unlimited | where {($_.MaxReceiveSize -ne "unlimited") -OR ($_.MaxSendSize -ne "unlimited") -OR ($_.RecipientLimits -ne "unlimited")}; $rmb1| FT name, max*size, recipientlimits

You can use these commands in Active Directory PowerShell Module to check these properties :

 

  • list all AD users and their Limits:

Get-ADUser -Filter * -Properties submissionContLength, delivContLength, MsExchRecipLimit | ft UserPrincipalName, submissionContLength, delivContLength, MsExchRecipLimit

 

  • list all AD users where Max Send Size (submissionContLength) is populated:

Get-ADUser -LDAPFilter "(&(ObjectClass=User)(submissionContLength=*))" -properties submissionContLength | ft userprincipalname, submissioncontLength

get-aduser1

  •  list all AD users where Max Receive Size (delivContLength) is populated:

Get-ADUser -LDAPFilter "(&(ObjectClass=User)(delivContLength=*))" -properties delivContLength | ft userprincipalname, delivContLength

 

get-aduser2

  • list all AD users where Recipient Limits (MsExchRecipLimit) is populated:

Get-ADUser -LDAPFilter "(&(ObjectClass=User)(MsExchRecipLimit=*))" -properties MsExchRecipLimit | ft userprincipalname, MsExchRecipLimit

get-aduser3

 

  • list all Remote Mailboxes and these 3 properties:

Get-ADUser -LDAPFilter "(&(ObjectClass=User)(msExchRemoteRecipientType=*))" -Properties submissionContLength, delivContLength, MsExchRecipLimit | ft -AutoSize UserPrincipalName, submissionContLength, delivContLength, MsExchRecipLimit

 

  • list all Remote Mailboxes where Max Send Size (submissionContLength) is populated:

Get-ADUser -LDAPFilter "(&(ObjectClass=User)(msExchRemoteRecipientType=*)(submissionContLength=*))" -Properties submissionContLength | ft -AutoSize UserPrincipalName, submissionContLength

get-aduser4

 

 

  • list all Remote Mailboxes where Max Receive Size (delivContLength) is populated:

Get-ADUser -LDAPFilter "(&(ObjectClass=User)(msExchRemoteRecipientType=*)(delivContLength=*))" -Properties delivContLength | ft -AutoSize UserPrincipalName, delivContLength

get-aduser5

  • list Remote Mailboxes  where Recipient Limits (MsExchRecipLimit) is populated:

Get-ADUser -LDAPFilter "(&(ObjectClass=User)(msExchRemoteRecipientType=*)(MsExchRecipLimit=*))" -Properties MsExchRecipLimit | ft -AutoSize UserPrincipalName, MsExchRecipLimit

 

get-aduser6

How to clear these values for Remote Mailboxes from AD PowerShell

After you have listed these, you  may want to clear these values in bulk on Remote Mailboxes, instead of going to ADSIedit on each remote mailbox user and modify from there.

Clearing the value in AD would be equivalent to "unlimited", default value in Exchange

Below some examples on how to do that:

 

  • Clear delivContLength (MaxReceiveSize) on all Remote Mailboxes where delivContLength is set:

Get-ADUser -LDAPFilter "(&(ObjectClass=User)(msExchRemoteRecipientType=*)(delivContLength=*))" -Properties delivContLength | Set-ADUser -Clear delivContlength

 

 

get-aduser7-png

 

In ADSIedit, we see delivContLength is now cleared (not set) for Remote Mailbox "mirela": adsi

In Exchange Management Shell, we see Unlimited for delivContLength (MaxReceiveSize): get-remotemailbox2-png

  • Clear submissionContLength (MaxSendSize) on all Remote Mailboxes where submissionContLength is set:

Get-ADUser -LDAPFilter "(&(ObjectClass=User)(msExchRemoteRecipientType=*)(submissionContLength=*))" -Properties submissionContLength | Set-ADUser -Clear submissionContLength

get-aduser8

 

In Exchange Management Shell, we see Unlimited for submissionContLength (MaxSendSize): get-remotemailbox3

  • Clear MsExchRecipLimit (RecipientLimits) on all Remote Mailboxes where MsExchRecipLimit  is set:

Get-ADUser -LDAPFilter "(&(ObjectClass=User)(msExchRemoteRecipientType=*)(MsExchRecipLimit=*))" -Properties MsExchRecipLimit | Set-ADUser -Clear MsExchRecipLimit

 

get-aduser9

In Exchange Management Shell, we see Unlimited for MsExchRecipLimit (RecipientLimits)

 

get-remotemailbox4

 

Seen these limitations for Remote Mailboxes and issues you could run into, would be always good to check these things prior moving the mailboxes to Office 365.

Comments

  • Anonymous
    December 12, 2016
    Thanksalways interesting
  • Anonymous
    May 19, 2017
    nice work!
  • Anonymous
    May 19, 2017
    The comment has been removed
    • Anonymous
      June 06, 2017
      Hi Christian, You can check the following suggestions:1) Check if you have any filter set in ADSIedit, for example "Show only attributes that have values"2) You might not have AD schema extended with Exchange attributes - msExch*. Check if you have this attribute at Transport Config /Org level as per this article (ADSIedit section) https://technet.microsoft.com/en-us/library/bb310771(v=exchg.80).aspx Open ADSI Edit, expand Configuration, and then expand CN=Configuration..., expand CN=Services, expand CN=Microsoft Exchange, expand CN=, and then select CN=Global Settings. In the result pane, right-click CN=Message Delivery, and then select Properties.3) Check PowerShell command to see if any error message when retrieving the property:Get-ADUser -LDAPFilter “(&(ObjectClass=User)(MsExchRecipLimit=*))” -properties MsExchRecipLimit | ft userprincipalname, MsExchRecipLimit
  • Anonymous
    May 26, 2017
    Nice one. That's a thorough coverage job well done.
  • Anonymous
    October 27, 2017
    Great blog. I just used it to address the send/receive issues in my hybrid deployment. Saved me a ton of time. Much appreciated!