Controlling attachment size in Exchange Server 2007 Outlook Web Access (OWA)

Yesterday afternoon, I was trying to send a large video of my new born baby to my mom through Exchange Server 2007 Outlook Web Access (OWA). And when I tried to upload the video, OWA would not let me do so. Darn it - cannot even share my baby's first shower with my mother. And then I realized - hey, didn't I write some code to prevent such uploads?

Now, you might say that sending my baby's video does not exactly constitute the best use of company resources but I can think of a lot of Administrators that might want to have control over attachment size in OWA.

If you are an administrator of an Exchange Server of your organization, read on...

By default, Exchange 2007 OWA will let you send attachments of up to 30 MB in size. Depending on your situation, you might want to either increase or decrease this number as we have a mechanism by which you can change the default upload limits of file attachments in OWA.

For example: in order to send attachments which are 50 MB or larger:

1. You need to set the MaxRequestLength in web.config to a value larger than 50 MB. The MaxRequestLength in web.config is an ASP.NET setting that prevents requests larger than a certain length which was added to prevent DOS attacks. It is set to 30 MB by default and needs to be increased in order to send attachments larger than 30 MB. This could also be decreased to enforce a lower limit.

2. You need to increase the MaxSubmitMessageSize which is a readonly Mailbox property (MaxSubmitMessageSize = 0x666D0003) and this is where we are getting the 10 MB limit from.

This is read from the following places:

  1. First read from Mailbox object of the user itself
  2.  if not found as denoted by "unlimited", Transport Settings Container
  3.  if not found as denoted by "unlimited", from Org Container (default read from Org Container)

In order to set the value, use the following tasks in the Exchange Management Shell:

1. set-transportconfig and then set MaxSendSize (this is in KBs) to 51200 for 50 MB attachments. This will set it for all users


2. set-mailbox and set the MaxSendSize (this is in KBs) to 51200 for 50 MB attachments for a specific set of users.

Once you set either, you need to recycle store or not access the mailbox for about 15-20 minutes (to let store cache expire) in order for the size change to have affect. Also, the property is stored in AD and subject to replication delays.

One more thing that you need to be aware of (sorry, the list just goes on):

We have a Request timeout of 60 minutes for any attachment upload request or attachment download (in OWA Basic and Premium). So, if you are trying to upload a 50MB attachment over a 56Kbps link, you will time out and get a HttpWebException (e.g., the max upload is about 25 MB over a 56 Kbps link).

So, to summarize, there are two keys to send a large attachment:

1. Modify ASP.NET web.config settings.

2. Modify the MaxSendSize using either the set-TransportConfig (for all users) or Set-Mailbox for individual users.

And you need to

3. Make sure the total upload time will be less than 60 minutes (based on your size and the speed of your network link)

The web.config change is immediate but the MaxSendSize change takes time, due to caching policy (Mailbox cache, DSAccess delays, and replication delays).


Web.Config change

By default, web.config under OWA Vdir (Microsoft\Exchange Server\ClientAccess\Owa) will have the following entry (by default, the max request size is approximately 30MB):


<httpRuntime maxRequestLength="30000" />



Change <httpRuntime maxRequestLength="30000" /> to <httpRuntime maxRequestLength="X" /> where X is the desired value in KBs. So, for 50MB, X will be approximately 50000.

Change per-user message size limit

Go to Exchange Management Shell, and type the following command:

Set-mailbox -id:"username" -MaxSendSize:50000

Where "username" is the mailbox identity. This will set the maximum message send limit to approximately 50 MB. You will need to restart store to see the effect immediately.

Change all-user message size limit

Go to Exchange Management Shell, and type the following command:

Set-transportconfig -MaxSendSize: 50000

This will set the maximum message send limit to approximately 50 MB. You will need to restart store to see the effect immediately.

- Raj Mukherjee

Comments (9)
  1. accellion says:

    Thank you for the posting. This is most helpful.

    Here is a follow up. What happens if the file that I need to upload takes more than 60 minutes? Is this a hard stop or how do I go around it?

    Thanks,  YFJ

  2. Raj says:

    If your file takes longer than 60 minutes, your upload with fail and you will get an error message. It is a hard stop and there is no way to get around it,

  3. accellion says:

    I realize this may go beyond the scope of Exchange/Outlook. However, if I am committed to stay within MSFT technology solution, how would I send files that takes more than 60 minutes to upload?

    Thanks,  YFJ

  4. Raj says:

    The limitation I mention above is an OWA limitation. I do not know if Outlook has a hard limitation/timeout after 60 minutes. I will confirm this with OLK folks and revert back to you on this. Alternatively, you can try Web Services to achieve this programatically. What exactly are you trying to achieve here – maybe, I can help more if I understand the problem better.

  5. Anonymous says:

    Hey, accellion, just can the marketing bs about your product with the mis-leading questions.  Pay for your advertising like everyone else, and stop spamming into others blogs.

    Oh, and remember this.  Now I will never purchase your bastardized toaster appliance.  And I will never recommend it to anyone that I consult with.

    Really, if using standard secure FTP services is beyond the capability of your clients, do they really need to be using computers?  You are no better than the spammers, just victimizing others with your snake oil.

  6. accellion says:


    I am sorry if my questions somehow rubbed you, Mr/Ms Anonymous, the wrong way. And, like Ben Franklin (or was it Jefferson), I too will defend your right to your opinion however poor it may be. This is, after all, the web.

    As for marketing bs, I am very flattered that you would think that the MSFT team would somehow collude with me by answering technical questions on Exchange Server 2007 email attachment sizes. Nevertheless, Thank you raising a stink because this will surely rouse a few more curious souls to find out what the fuss is about!

    Regards,  YFJ

  7. accellion says:

    Hi Raj,

    Thank you for your note as always.

    The general situation is to address end users’ need for ad hoc sending of large files given end users’ preference and comfort level with email and attachment. This has been difficult to address programmatically because it is event driven and the sender/receiver pairs are constantly changing.

    So, I was wondering if SharePoint or other products can help to address the ad hoc file sending needs. (May be outside of the scope of this discussion, of course.)

    Regards,  YFJ

  8. accellion says:

    Hi Raj,

    I am wondering if you have had a chance to talk with the OLK folks about the time out setting?

    Look forward to your thoughts.

    Warm regards,  YFJ

  9. In E2K3, we have per-user msg size limit setting, connector size setting, VS size setting, and org-level size setting. somehow it overrides one another.

    how about E2K7?


Comments are closed.

Skip to main content