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?

1 Answer 1


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.

  • It would be great to see a reference or validation of 37%. Please share if you come across something Oct 10, 2010 at 16:31
  • @makerofthings7 it needs to be that exact? really?
    – Jim B
    Oct 10, 2010 at 16:42
  • I'd like to know how 37% was derived. My clients may ask me where did I come up with that number Oct 10, 2010 at 18:10
  • @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.
    – sysadmin1138
    Oct 10, 2010 at 18:21
  • 1
    @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.
    – Jim B
    Oct 11, 2010 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.