Considering MIME Expansion bloat, how does that affect settings for Exchange 2003/2007/2010 message size limits?

7,598

The Exchange size-limit is indeed the size of the actual message, not the decoded attachment size. So yes, you will have to do the math. Base64 encoding doesn't change from Exchange version to Exchange version, they've consistently been limiting on the size of the message in the mailer-queue (i.e. encoded).

That size is the full size of the message in the DATA block of the SMTP conversation. That's headers, body, and base64-encoded attachments (and in exceedingly rare cases, UUENCODED attachments! Those still work.). Since this is MIME, not simple b64, the math works out to an expansion factor of 1.37 (link). That is the 3 bytes into 4 bytes expansion (+.33), plus the terminal CRLF characters after ever 72 characters (+.04). Above and beyond this are the fixed costs of headers, actual body of the message, and the MIME headers inside the body; depending on how large the attachments are these costs may be negligible.

Simple B64 is 1.33, but MIME is 1.37.

So, for a 45MB message size limit (46080 kb), you need to set a limit of 63130 Kb.

Share:
7,598

Related videos on Youtube

Juanjo Daza
Author by

Juanjo Daza

Updated on September 17, 2022

Comments

  • Juanjo Daza
    Juanjo Daza almost 2 years

    Since the mime encoding can increase a message's size by 33%, what is the correct math I need to do to filter messages larger than 45Mb? Is the math needed at all?

    Does the math change among different versions of Exchange?

  • Juanjo Daza
    Juanjo Daza over 13 years
    It would be great to see a reference or validation of 37%. Please share if you come across something
  • raja
    raja over 13 years
    @makerofthings7 it needs to be that exact? really?
  • Juanjo Daza
    Juanjo Daza over 13 years
    I'd like to know how 37% was derived. My clients may ask me where did I come up with that number
  • Deb
    Deb over 13 years
    @MakerOfThings7 Headers and message bodies make up some overhead beyond just how big that .PPT file is, though of course it's a sliding scale the larger the attachment is.
  • raja
    raja over 13 years
    @makerofthings7, why try to invent some magic algorithm to predict the decoded size of a group of unknown type attachements, if you are trying to limit the size to 45 MB limit it to 45 MB. Exchange uses the queue size in order to avoid worrying about encoded size.
  • Juanjo Daza
    Juanjo Daza over 13 years
    @JimB - Sysadmin1138 says "So, yes, you will have to do the math". That seems to be opposite of what you are saying. I'm confused.
  • raja
    raja over 13 years
    @makerofallthings7 - sorry if I wasn't clear, generally speaking admins limit size in order to reduce queuelength and reduce bandwith usage. So if you want it to be 45Mb only the encoded size "counts" since that's what gets tranmitted over the wire. Also the encoding growth is just rule of thumb accurate. Just playing I was able to set the limit suggested by sysadmin1138 (correctly btw) and was able to send a 50MB single attachment and unable to send 45 MB of various files attached. A better method if you want to limit attachment size (and not the send size) is to limit it on the client.