my company migrated to Office 365 mailboxes a few weeks ago. Since then I notice that a status email I receive from some job that runs on another server varies in size, although the body (and, on the first look, also the header) does not change significantly, e.g.

  • sender is always the same
  • recipients are always the same
  • body is always the same content (2 lines of text) and format (text-only)

Additionally, before the O365 migration, the exact same email was (according to Outlook) 10KB in size, whereas now (after O365 migration) it has a size of about 27KB to 29KB

Of course, if I take a look at the mail header information, the header lines differ, compared to before the migration, for sure due to O365 coming in place. Before migration the header consisted of about 1300 chars, whereas now is consists of around 10000 chars. If I save the header to a textfile I already see a difference of roughly 8500bytes, but this does neither tell me where the other ~10KB come from, nor why the size varies.

Just wondering if there is some explanation for this behaviour or maybe even some kind of "fix".

Side note: I'd like to create a rule that moves these status mails to an inbox subfolder if it contains only 2 lines / has only a size of xx KB (meaning: everything is OK), while a status mail with 3 or more lines should get my attention in the inbox - which is hard to implement if the mail size differs by 2-3KB, because an additional third line of code might also add these 2-3KB


Without the actual messages to compare and analyze its hard to say specifically where everything is coming from.

When moving through Office365, you will hit a variety of servers before mail gets to your inbox, this include Exchange online protection servers and the exchange servers hosting your mail service. These servers can and do change, and depending on the routing you may have a few more or less servers with each message flow.

If message encoding types is changing in transit, that could also add to message size. A few bytes can be added if TLS was used and stamped into the headers as well.

As for your rules - if the message can be modified to create trigger words, the situation is exponentially easier. Otherwise I think you have to rely on Macro or VBScript that can analyze the message and execute the action you want to perform.

NOTE: You may be able to utilize Flow in your scenario as well. There is a new Mail Export action available, that you maybe able to manipulate with data operations, from there you can use that to send SMS alerts, move to new folder, or any other action that Flow supports.

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.